 , un module produit , un module fournisseur ... //
// un module aura un controller et un service //
import { Module } from '@nestjs/common';
// controller permet d'écouteur les requetes entrante et renvoyer une réponse //
import { AppController } from './app.controller';
// il fournit des fonctionnalitées au controller //
import { AppService } from './app.service';
import { TodosModule } from './todos/todos.module';

@Module({
  imports: [TodosModule],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}
import { AbstractDateCriteria } from './abstract.date.criteria.model';
import { CriteriaType } from './criteria.type.model';

export class ValidOnCriteria extends AbstractDateCriteria {

    static readonly emptyStringRepresentation = 'Valid on';

    get stringRepresentation(): string {
        return `Valid on: ${(this.value && this.value) ? this.value.toLocaleDateString() : ''}`;
    }

    value: Date;

    type = CriteriaType.DATE;
}

import os = require('os');
import cluster = require('cluster');

/**
 * class responsible for running node server in cluster
 * mode
 */
class ClusterManager {

  private readonly cpuCount: number = os.cpus().length;

  /**
   * starts multiple worker processes of passed in callback
   * function, based on cpu count of operating system
   * @param {function(void): void} - process to fork
   * @return {void}
   */
  spawnWorkers(callback: () => void): void {
    if (cluster.isMaster) {
      for (let i = 0; i < this.cpuCount; ++i) {
        cluster.fork();
      }
      console.log(this.cpuCount + " workers running...");
    }
    else {
      callback();
      console.log(`Worker ${process.pid} started...`);
    }
  }

  /**
   * handles a single worker process shutting down by forking
   * a new worker process
   * @param {void}
   * @return {void}
   */
  handleWorkerShutdown(): void {
    cluster.on('exit', (worker, code, signal) => {
      console.log(
        'Worker %d died by code/signal %s. Restarting worker...',
        worker.process.pid, signal || code
      );
      cluster.fork();
    });
  }

}

export { ClusterManager };
console.log("Hola a todos");

//Number
//Explicito
let phone: number;
phone = 1;
phone = 54267891;
//phone = "+34 54267891"; //Error Type 'string' is not assignable to type 'number'.

//Inferido - given
let phoneNumber = 54267891;
phoneNumber = 123;
//phoneNumber = true; //Error Type 'boolean' is not assignable to type 'number'.

//valores hexadecimales
let hex: number = 0xf00d; //after 0x we can use 0 to 9 and a b c d e f

//valores binarios
let binary: number = 0b1010; //0b indicates that a binary value follows, only 0 and 1

//valores octales
let octal: number = 0o744; //0o indicates octal value and digits between 0 and 7

//Boolean
//Explicito
let isPro: boolean; //to indicate if a user that publishes photos is pro or not (has a license)
isPro = true;
//isPro = 1; //Error Type 'number' is not assignable to type 'boolean'.

//Inferido
let isUserPro = false;
isUserPro = true;
//isUserPro = 1; //Error Type 'number' is not assignable to type 'boolean'.

//String
let username: string = "Camilla";
username = "Luis";
//username = true; //Type 'boolean' is not assignable to type 'string'.

//Template string
//Backtick `
let userinfo: string;
userinfo = `
    User Info:
    username:


}

	ab.Value.Set(newValue)
}

type BigInt struct {
	mu    sync.Mutex
	Value *big.Int
}

func NewBigInt(initialValue *big.Int) *BigInt {
	return &BigInt{
		Value: new(big.Int).Set(initialValue),
	}
}

func (ab *BigInt) Add(delta *big.Int) *big.Int {
	ab.mu.Lock()
	defer ab.mu.Unlock()

	if ab.Value == nil {
		ab.Value = new(big.Int)
	}

	ab.Value.Add(ab.Value, delta)
	return new(big.Int).Set(ab.Value)
}

func (ab *BigInt) Load() *big.Int {
	ab.mu.Lock()
	defer ab.mu.Unlock()
	if ab.Value == nil {
		return nil
	}
	return new(big.Int).Set(ab.Value)
}

func (ab *BigInt) Store(newValue *big.Int) {
	ab.mu.Lock()
	defer ab.mu.Unlock()

	if ab.Value == nil {
		ab.Value = new(big.Int)
	}

	ab.Value.Set(newValue)
}

type Address struct {
	mu    sync.Mutex
	Value common.Address
}

func NewAddress(initialValue common.Address) *Address {
	return &Address{
		Value: initialValue,
	}
}

func (aa *Address) Load() common.Address {
	aa.mu.Lock()
	defer aa.mu.Unlock()

	return aa.Value
}

func (aa *Address) Store(newValue common.Address) {
	aa.mu.Lock()
	defer aa.mu.Unlock()

	aa.Value = newValue
}

type String struct {
	mu    sync.Mutex
	Value string
}

func NewString(initialValue string) *String {
	return &String{
		Value: initialValue,
	}
}

func (as *String) Load() string {
	as.mu.Lock()
	defer as.mu.Unlock()

	return as.Value
}

func (as *String) Store(newValue string) {
	as.mu.Lock()
	defer as.mu.Unlock()

	as.Value = newValue
}
package reporter_test

import (
	"errors"
	"testing"
	"time"

	"github.com/HdrHistogram/hdrhistogram-go"
	"github.com/miekg/dns"
	"github.com/stretchr/testify/assert"
	"github.com/tantalor93/dnspyre/v3/pkg/dnsbench"
	"github.com/tantalor93/dnspyre/v3/pkg/reporter"
)

func TestMerge(t *testing.T) {
	start := time.Now()
	stats := []*dnsbench.ResultStats{
		{
			Codes: map[int]int64{
				dns.RcodeSuccess:       2,
				dns.RcodeNameError:     1,
				dns.RcodeServerFailure: 1,
			},
			Qtypes: map[string]int64{
				"A":    2,
				"AAAA": 2,
			},
			Hist: histogramWithValues(time.Second, 2*time.Second, time.Second),
			Timings: []dnsbench.Datapoint{
				{
					Start:    start,
					Duration: time.Second,
				},
				{
					Start:    start.Add(time.Second),
					Duration: 2 * time.Second,
				},
				{
					Start:    start.Add(2 * time.Second),
					Duration: time.Second,
				},
			},
			Counters: &dnsbench.Counters{
				Success:    2,
				Negative:   1,
				Truncated:  1,
				IOError:    2,
				Error:      1,
				IDmismatch: 1,
				Total:      8,
			},
			Errors: []dnsbench.ErrorDatapoint{
				{
					Start:


css';

import { SliderProducts } from '../../data/products';

const Slider = () => {
  return (

      <Swiper
        breakpoints={{
          640:{
            slidesPerView: 3
          },
          0:{
            slidesPerView: 0
          }
        }}

        modules={[Pagination, Navigation]}
        className='mySwiper'
        navigation={true}
        loopFillGroupWithBlank={true}
        slidesPerView={3}
        spaceBetween={40}
        slidesPerGroup={1}
        loop={true}
      >
        {SliderProducts.map((slide, i) => (
          <SwiperSlide key={i}>

                {slide.name}
                {slide.detail}

              {slide.price}$

Shop Now

          </SwiperSlide>
        ))}
      </Swiper>

  );
};

export default Slider;
import React from 'react';
import Hero from '../../assets/testimonialHero.png';
import { TestimonialsData } from '../../data/testimonials'
import css from './Testimonials.module.css';
import { Swiper, SwiperSlide } from 'swiper/react';

const Testimonials = () => {
  return (

            Top Rated

                Seedly say has suitable disposal and boy. Exercise joy man children rejoiced

          100K
          Happy Customers With Us!

Reviews

        <Swiper
        slidesPerView={3}
        slidesPerGroup={1}
        spaceBetween={20}
        className={css.tCarousal}
        breakpoints={{
          856: {
            slidesPerView: 3
          },
          640: {
            slidesPerView: 2
          },
          0: {
            slidesPerView: 1
          }
        }}

        >
            {
                TestimonialsData.map((testimonial, i)=> (
                    <SwiperSlide>

                            {testimonial.comment}

                            {testimonial.name}

                    </SwiperSlide>
                ))
            }
        </Swiper>

  );
};

export default Testimonials;
document.getElementById("fetchDataBtn").addEventListener("click", () => {
  fetch("http://127.0.0.1:7878/")
    .then((response) => {
      if (!response.ok) {
        throw new Error(`HTTP error! Status: ${response.status}`);
      }

      return response.json();
    })
    .then((data) => {
      console.log({ data });
      document.getElementById("output").innerHTML = `
${JSON.stringify(
        data,
        null,
        2
      )}
`;
    })
    .catch((error) => {
      document.getElementById("output").innerHTML = `Error: ${error.message}`;
    });
});

function postData() {
  const data = { key: "value" };

  fetch("http://127.0.0.1:7878", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    body: JSON.stringify(data),


 unexpected type '%s' for sender", args_[8].instanceOf())
	}

	senderPublicKey, ok := args_[9].(rideByteVector)
	if !ok {
		return nil, errors.Errorf("invokeScriptTransactionV4Constructor: unexpected type '%s' for senderPublicKey", args_[9].instanceOf())
	}

	bodyBytes, ok := args_[10].(rideByteVector)
	if !ok {
		return nil, errors.Errorf("invokeScriptTransactionV4Constructor: unexpected type '%s' for bodyBytes", args_[10].instanceOf())
	}

	payments, ok := args_[11].(rideList)
	if !ok {
		return nil, errors.Errorf("invokeScriptTransactionV4Constructor: unexpected type '%s' for payments", args_[11].instanceOf())
	}
	// checks for list elements
	for _, el := range payments {
		switch te := el.(type) {
		case rideAttachedPayment:
		default:
			return nil, errors.Errorf("invokeScriptTransactionV4Constructor: unexpected type '%s' in payments list", te.instanceOf())
		}
	}

	proofs, ok := args_[12].(rideList)
	if !ok {
		return nil, errors.Errorf("invokeScriptTransactionV4Constructor: unexpected type '%s' for proofs", args_[12].instanceOf())
	}
	// checks for list elements
	for _, el := range proofs {
		switch te := el.(type) {
		case rideByteVector:
		default:
			return nil, errors.Errorf("invokeScriptTransactionV4Constructor: unexpected type '%s' in proofs list", te.instanceOf())
		}
	}

	return newRideInvokeScriptTransactionV4(proofs, feeAssetId, dApp, function, bodyBytes, id, senderPublicKey, payments, args, timestamp, fee, version, sender), nil
}

func issueTransactionConstructor(_ environment, args_ ...rideType) (rideType, error) {
	if err := checkArgs(args_, 14); err != nil {
		return nil, errors.Wrap(err, "issueTransactionConstructor")
	}

	quantity, ok := args_[0].(rideInt)
	if !ok {
		return nil, errors.Errorf("issueTransactionConstructor: unexpected type '%s' for quantity", args_[0].instanceOf())
	}

	name, ok := args_[1].(rideString)
	if !ok {
		return nil, errors.Errorf("issueTransactionConstructor: unexpected type '%s' for name", args_[1].instanceOf())
	}

	description, ok := args_[2].(rideString)
	if !ok {
		return nil, errors.Errorf("issueTransactionConstructor: unexpected type '%s' for description", args_[2].instanceOf())
	}

	reissuable, ok := args_[3].(rideBoolean)
	if !ok {
		return nil, errors.Errorf("issueTransactionConstructor: unexpected type '%s' for reissuable", args_[3].instanceOf())
	}

	decimals, ok := args_[4].(rideInt)
	if !ok {
		return nil, errors.Errorf("issueTransactionConstructor: unexpected type '%s' for decimals", args_[4].instanceOf())
	}

	var script rideType
	switch v := args_[5].(type) {
	case rideByteVector, rideUnit:
		script = v
	default:
		return nil, errors.Errorf("issueTransactionConstructor: unexpected type '%s' for script", args_[5].instanceOf())
	}

	id, ok := args_[6].(rideByteVector)
	if !ok {
		return nil, errors.Errorf("issueTransactionConstructor: unexpected type '%s' for id", args_[6].instanceOf())
	}

	fee, ok := args_[7].(rideInt)
	if !ok {
		return nil, errors.Errorf("issueTransactionConstructor: unexpected type '%s' for fee", args_[7].instanceOf())
	}

	timestamp, ok := args_[8].(rideInt)
	if !ok {
		return nil, errors.Errorf("issueTransactionConstructor: unexpected type '%s' for timestamp", args_[8].instanceOf())
	}

	version, ok := args_[9].(rideInt)
	if !ok {
		return nil, errors.Errorf("issueTransact


   make(chan struct{}),

		snapshotterReady: make(chan *snap.Snapshotter, 1),
		// rest of structure populated after WAL replay
	}
	go rc.startRaft()
	return commitC, errorC, rc.snapshotterReady
}

func (rc *raftNode) saveSnap(snap raftpb.Snapshot) error {
	// must save the snapshot index to the WAL before saving the
	// snapshot to maintain the invariant that we only Open the
	// wal at previously-saved snapshot indexes.
	walSnap := walpb.Snapshot{
		Index: snap.Metadata.Index,
		Term:  snap.Metadata.Term,
	}
	if err := rc.wal.SaveSnapshot(walSnap); err != nil {
		return err
	}
	if err := rc.snapshotter.SaveSnap(snap); err != nil {
		return err
	}
	return rc.wal.ReleaseLockTo(snap.Metadata.Index)
}

func (rc *raftNode) entriesToApply(ents []raftpb.Entry) (nents []raftpb.Entry) {
	if len(ents) == 0 {
		return ents
	}
	firstIdx := ents[0].Index
	if firstIdx > rc.appliedIndex+1 {
		log.Fatalf("first index of committed entry[%d] should <= progress.appliedIndex[%d]+1", firstIdx, rc.appliedIndex)
	}
	if rc.appliedIndex-firstIdx+1 < uint64(len(ents)) {
		nents = ents[rc.appliedIndex-firstIdx+1:]
	}
	return nents
}

// publishEntries writes committed log entries to commit channel and returns
// whether all entries could be published.
func (rc *raftNode) publishEntries(ents []raftpb.Entry) bool {
	for i := range ents {
		switch ents[i].Type {
		case raftpb.EntryNormal:
			if len(ents[i].Data) == 0 {
				// ignore empty messages
				break
			}
			s := string(ents[i].Data)
			select {
			case rc.commitC <- &s:
			case <-rc.stopc:
				return false
			}

		case raftpb.EntryConfChange:
			var cc raftpb.ConfChange
			cc.Unmarshal(ents[i].Data)
			rc.confState = *rc.node.ApplyConfChange(cc)
			switch cc.Type {
			case raftpb.ConfChangeAddNode:
				if len(cc.Context) > 0 {
					rc.transport.AddPeer(types.ID(cc.NodeID), []string{string(cc.Context)})
				}
			case raftpb.ConfChangeRemoveNode:
				if cc.NodeID == uint64(rc.id) {
					log.Println("I've been removed from the cluster! Shutting down.")
					return false
				}
				rc.transport.RemovePeer(types.ID(cc.NodeID))
			}
		}

		// after commit, update appliedIndex
		rc.appliedIndex = ents[i].Index

		// special nil commit to signal replay has finished
		if ents[i].Index == rc.lastIndex {
			select {
			case rc.commitC <- nil:
			case <-rc.stopc:
				return false
			}
		}
	}
	return true
}

func (rc *raftNode) loadSnapshot() *raftpb.Snapshot {
	snapshot, err := rc.snapshotter.Load()
	if err != nil && err != snap.ErrNoSnapshot {
		log.Fatalf("raftexample: error loading snapshot (%v)", err)
	}
	return snapshot
}

// openWAL returns a WAL ready for reading.
func (rc *raftNode) openWAL(snapshot *raftpb.Snapshot) *wal.WAL {
	if !wal.Exist(rc.waldir) {
		if err := os.Mkdir(rc.waldir


ession(memberDomainMap);

            if ((bool)scalar.Value == false)
            {
                // The range of the variable was "inverted". Return a NOT of
                // the expression
                expr = new DomainNotExpr(expr);
            }
            return expr;
        }
    }
}


0 is word aligned
	beqz	a3,.Lua_chk16w
	 subu	a2,a2,a3	# bytes left after initial a3 bytes

	LWHI	v1,0(a1)
	LWLO	v1,3(a1)
	addu	a1,a1,a3	# a3 may be here 1, 2 or 3
	SWHI	v1,0(a0)
	addu	a0,a0,a3	# below the dst will be word aligned (NOTE1)

.Lua_chk16w:
	andi	t8,a2,0x3f	# any whole 64-byte chunks?
				# t8 is the byte count after 64-byte chunks
	beq	a2,t8,.Lua_chk8w # if a2==t8, no 64-byte chunks
				# There will be at most 1 32-byte chunk after it
	 subu	a3,a2,t8	# subtract from a2 the reminder
                                # Here a3 counts bytes in 16w chunks
	addu	a3,a0,a3	# Now a3 is the final dst after 64-byte chunks

	addu	t0,a0,a2	# t0 is the "past the end" address

	subu	t9,t0,160	# t9 is the "last safe pref 30,128(a0)" address

	pref    0,0(a1)		# bring the first line of src, addr 0
	pref    0,32(a1)	# bring the second line of src, addr 32
	pref    0,64(a1)	# bring the third line of src, addr 64
	pref	30,32(a0)	# safe, as we have at least 64 bytes ahead
# In case the a0 > t9 don't use "pref 30" at all
	sgtu	v1,a0,t9
	bgtz	v1,.Lua_loop16w	# skip "pref 30,64(a0)" for too short arrays
	 nop
# otherwise, start with using pref30
	pref	30,64(a0)
.Lua_loop16w:
	pref	0,96(a1)
	LWHI	t0,0(a1)
	LWLO	t0,3(a1)
	LWHI	t1,4(a1)
	bgtz	v1,.Lua_skip_pref30_96
	 LWLO	t1,7(a1)
	pref    30,96(a0)   # continue setting up the dest, addr 96
.Lua_skip_pref30_96:
	LWHI	t2,8(a1)
	LWLO	t2,11(a1)
	LWHI	t3,12(a1)
	LWLO	t3,15(a1)
	LWHI	t4,16(a1)
	LWLO	t4,19(a1)
	LWHI	t5,20(a1)
	LWLO	t5,23(a1)
	LWHI	t6,24(a1)
	LWLO	t6,27(a1)
	LWHI	t7,28(a1)
	LWLO	t7,31(a1)
        pref    0,128(a1)    # bring the next lines of src, addr 128

	sw	t0,0(a0)
	sw	t1,4(a0)
	sw	t2,8(a0)
	sw	t3,12(a0)
	sw	t4,16(a0)
	sw	t5,20(a0)
	sw	t6,24(a0)
	sw	t7,28(a0)

	LWHI	t


FALSE     = No open connection to the share.
//      other       = Some error code.

HRESULT
IsOpenConnectionPathUNC(
    LPCTSTR pszPathUNC
    )
{
    TCHAR szShare[MAX_PATH * 2];
    lstrcpyn(szShare, pszPathUNC, ARRAYSIZE(szShare));
    PathStripToRoot(szShare);
    return PathIsUNCServerShare(szShare) && IsOpenConnectionShare(szShare);
}

// Determine if a net share has an open connection on the local machine.

// Returns:

//      S_OK        = There is an open connection to the share.
//      S_FALSE     = No open connection to the share.
//      other       = Some error code.

HRESULT
IsOpenConnectionShare(
    LPCTSTR pszShare
    )
{
    DWORD dwStatus;
    if (CSCQueryFileStatus(pszShare, &dwStatus, NULL, NULL))
    {
        if (FLAG_CSC_SHARE_STATUS_CONNECTED & dwStatus)
            return S_OK;
    }
    return S_FALSE;
}

// With this version of CSCIsCSCEnabled, we can delay all extra dll loads
// (including cscdll.dll) until we actually see a net file/folder.
#include <devioctl.h>
#include <shdcom.h>
static TCHAR const c_szShadowDevice[] = TEXT("\\\\.\\shadow");

BOOL IsCSCEnabled(void)
{
    BOOL bIsCSCEnabled = FALSE;
    SHADOWINFO sSI = {0};
    ULONG ulBytesReturned;

    HANDLE hShadowDB = CreateFile(c_szShadowDevice,
                                  FILE_EXECUTE,
                                  FILE_SHARE_READ | FILE_SHARE_WRITE,
                                  NULL,
                                  OPEN_EXISTING,
                                  0,
                                  NULL);
    if (INVALID_HANDLE_VALUE == hShadowDB)
        return FALSE;

    sSI.uStatus = SHADOW_SWITCH_SHADOWING;
    sSI.uOp = SHADOW_SWITCH_GET_STATE;

    if (DeviceIoControl(hShadowDB,
                        IOCTL_SWITCHES,
                        (LPVOID)(&sSI),
                        0,
                        NULL,
                        0,
                        &ulBytesReturned,
                        NULL))
    {
        bIsCSCEnabled = (sSI.uStatus & SHADOW_SWITCH_SHADOWING);
    }
    CloseHandle(hShadowDB);

    return bIsCSCEnabled;
}

BOOL
IsSyncInProgress(
    void
    )
{
    BOOL bSyncInProgress = FALSE; // Assume sync NOT in progress.

    HANDLE hMutex = OpenMutex(SYNCHRONIZE, FALSE, c_szSyncInProgMutex);
    if (NULL != hMutex)
    {
        switch(WaitForSingleObject(hMutex, 0))
        {
            case WAIT_TIMEOUT:

                // Could NOT get ownership of mutex.  Sync is in progress.

                bSyncInProgress = TRUE;
                break;

            case WAIT_OBJECT_0:

                // Took ownership of mutex.  Sync not in progress.

                ReleaseMutex(hMutex);
                break;

            case WAIT_ABANDONED:

                // Mutex was abandoned by it's owning thread.
                // Probably the result of someone killing mobsync.exe
                // during a sync.  Note that this can happen through a
                // "Mobsync not responding, kill now?" dialog that is
                // displayed by mobsync if it appears to be hung.

            default:
                break;
        }
        CloseHandle(hMutex);
    }
    return bSyncInProgress;
}

BOOL
IsPurgeInProgress(
    void
    )
{
    BOOL bPurgeInProgr


fixed capacity
					stats.put( "queueUtilization", 0.0 ); // Not applicable for ForkJoinPool
					stats.put( "poolUtilization", pool.getPoolSize() > 0 ? ( double ) pool.getActiveThreadCount() / pool.getPoolSize() * 100.0 : 0.0 );
					stats.put( "threadsUtilization", pool.getPoolSize() > 0 ? ( double ) pool.getActiveThreadCount() / pool.getPoolSize() * 100.0 : 0.0 );
					stats.put( "taskCompletionRate", 0.0 ); // Not easily calculable for ForkJoinPool
				}
				break;
			default :
				// Keep defaults for unknown types
				break;
		}

		// Add health status (this must come last after all stats are calculated)
		String	healthStatus	= getHealthStatus( stats );
		IStruct	healthReport	= getHealthReport( stats, healthStatus );
		stats.put( "healthStatus", healthStatus );
		stats.put( "healthReport", healthReport );

		return stats;
	}

	/**
	 * Get the health status of the executor based on various metrics
	 *
	 * @param stats The current stats of the executor
	 *
	 * @return Health status string: "healthy", "degraded", "critical", "idle", "shutdown", "terminated", "draining"
	 */
	private String getHealthStatus( IStruct stats ) {
		// Shutdown/termination states (highest priority)
		if ( Boolean.TRUE.equals( stats.get( "isTerminated" ) ) )
			return "terminated";
		if ( Boolean.TRUE.equals( stats.get( "isShutdown" ) ) )
			return "shutdown";
		if ( Boolean.TRUE.equals( stats.get( "isTerminating" ) ) )
			return "draining";

		Map<String, Object>	poolThreshold				= ( Map<String, Object> ) this.healthThresholds.get( "poolUtilization" );
		Map<String, Object>	threadThreshold				= ( Map<String, Object> ) this.healthThresholds.get( "threadUtilization" );
		Map<String, Object>	queueThreshold				= ( Map<String, Object> ) this.healthThresholds.get( "queueUtilization" );
		Map<String, Object>	taskThreshold				= ( Map<String, Object> ) this.healthThresholds.get( "taskCompletionRate" );

		int					poolCritical				= ( Integer ) poolThreshold.get( "critical" );
		int					threadCritical				= ( Integer ) threadThreshold.get( "critical" );
		int					queueCritical				= ( Integer ) queueThreshold.get( "critical" );
		int					taskCritical				= ( Integer ) taskThreshold.get( "critical" );
		int					poolDegraded				= ( Integer ) poolThreshold.get( "degraded" );
		int					threadDegraded				= ( Integer ) threadThreshold.get( "degraded" );
		int					queueDegraded				= ( Integer ) queueThreshold.get( "degraded" );
		int					taskDegraded				= ( Integer ) taskThreshold.get( "degraded" );

		Double				poolUtilization				= ( Double ) stats.get( "poolUtilization" );
		Double				threadUtilization			= ( Double ) stats.get( "threadsUtilization" );
		Double				queueUtilization			= ( Double ) stats.get( "queueUtilization" );
		Double				taskCompletionRate			= ( Double ) stats.get( "taskCompletionRate" );
		Boolean				queueIsFull					= ( Boolean ) stats.get( "queueIsFull" );
		Long				lastActivityMinutesAgo		= ( Long ) stats.get( "lastActivityMinutesAgo" );
		Integer				activeCount					= ( Integer ) stats.get( "activeCount" );
		Integer				queueSize					= ( Integer ) stats.get( "queueSize" );
		Long				taskCount					= ( Long ) stats.get( "taskCount" );

		int					inactivityThreshold			= ( Integer ) ( ( Map<String, Object> ) this.healthThresholds.get( "inactivityMinutes" ) )
		    .get( "


�看记录
     * @param watchItem 观看记录
     */
    @SuppressLint("SimpleDateFormat")
    fun saveWatchVideoHistory(watchItem: HomeBean.Issue.Item) {
        Thread {
            //保存之前要先查询sp中是否有该value的记录，有则删除.这样保证搜索历史记录不会有重复条目
            val historyMap =
                WatchHistoryUtils.getAll(Constants.FILE_WATCH_HISTORY_NAME) as Map<*, *>
            for ((key, _) in historyMap) {
                if (watchItem == WatchHistoryUtils.getObject(
                        Constants.FILE_WATCH_HISTORY_NAME,
                        key as String
                    )
                ) {
                    WatchHistoryUtils.remove(Constants.FILE_WATCH_HISTORY_NAME, key)
                }
            }

            val format = SimpleDateFormat("yyyyMMddHHmmss")
            WatchHistoryUtils.putObject(
                Constants.FILE_WATCH_HISTORY_NAME,
                watchItem,
                "" + format.format(Date())
            )
        }.start()
    }

    /**
     * 获取观看的历史记录
     */
    fun getWatchHistory(): LemonSpace<ArrayList<HomeBean.Issue.Item>> {
        return LemonSpace.create {
            val historyMax = 20//最大显示条数
            val watchList = ArrayList<HomeBean.Issue.Item>()
            val hisAll = WatchHistoryUtils.getAll(Constants.FILE_WATCH_HISTORY_NAME) as Map<*, *>
            //将key排序升序
            val keys = hisAll.keys.toTypedArray()
            Arrays.sort(keys)
            val keyLength = keys.size
            //这里计算 如果历史记录条数是大于 可以显示的最大条数，则用最大条数做循环条件，防止历史记录条数-最大条数为负值，数组越界
            val hisLength = if (keyLength > historyMax) historyMax else keyLength
            // 反序列化和遍历 添加观看的历史记录
            (1..hisLength).mapTo(watchList) { position ->
                WatchHistoryUtils.getObject(
                    Constants.FILE_WATCH_HISTORY_NAME,
                    keys[keyLength - position] as String
                ) as HomeBean.Issue.Item
            }
            watchList
        }
    }

}
package org.walletconnect

import java.net.URLDecoder
import java.net.URLEncoder

interface Session {
    fun init()

    /**
     * Send client info to the bridge and wait for a client to connect
     */
    fun offer()
    fun approve(accounts: List<String>, chainId: Long)
    fun reject()
    fun update(accounts: List<String>, chainId: Long)
    fun kill()

    fun peerMeta(): PeerMeta?
    fun approvedAccounts(): List<String>?

    fun approveRequest(id: Long, response: Any)
    fun rejectRequest(id: Long, errorCode: Long, errorMsg: String)
    fun performMethodCall(call: MethodCall, callback: ((MethodCall.Response) -> Unit)? = null)

    fun addCallback(cb: Callback)
    fun removeCallback(cb: Callback)
    fun clearCallbacks()

    data class FullyQualifiedConfig(
            val handshakeTopic: String,
            val bridge: String,
            val key: String,
            val protocol: String = "wc",
            val version: Int = 1
    )

    data class Config(
            val handshakeTopic: String,
            val bridge: String? = null,
            val key: String? = null,
            val protocol: String = "wc",
            val version: Int = 1
    ) {
        fun toWCUri() = "wc:$handshakeTopic@$version?bridge=${URLEncoder.encode(bridge, "UTF-8")}&key=$key"

        fun isFullyQualifiedConfig() = bridge != null && key != null
        fun toFullyQualifiedConfig() = FullyQualifiedConfig(handshakeTopic, bridge!!, key!!, protocol, version)

        companion object {
            fun fromWCUri(uri: String): Config {
                val protocolSeparator = uri.indexOf(':')
                val handshakeTopicSeparator = uri.indexOf('@', startIndex = protocolSeparator)
                val versionSep


("unknownFunc")
	if err == nil {
		t.Error("WrapPrintDetermineError should return error")
	}

	if !errors.Is(err, codegen.ErrPrintDetermineError) {
		t.Error("Should wrap ErrPrintDetermineError")
	}

	if !strings.Contains(err.Error(), "unknownFunc") {
		t.Error("Should contain function name")
	}
}

func TestWrapBuiltInRedefine(t *testing.T) {
	err := codegen.WrapBuiltInRedefine("print")
	if err == nil {
		t.Error("WrapBuiltInRedefine should return error")
	}

	if !errors.Is(err, codegen.ErrBuiltInRedefine) {
		t.Error("Should wrap ErrBuiltInRedefine")
	}

	if !strings.Contains(err.Error(), "print") {
		t.Error("Should contain function name")
	}
}

func TestWrapIteratorErrors(t *testing.T) {
	tests := []struct {
		name     string
		funcName string
		baseErr  error
	}{
		{"WrapMapWrongArgs", codegen.MapFunc, codegen.ErrWrongArgCount},
		{"WrapFilterWrongArgs", codegen.FilterFunc, codegen.ErrWrongArgCount},
		{"WrapFoldWrongArgs", codegen.FoldFunc, codegen.ErrWrongArgCount},
	}

	for _, test := range tests {
		t.Run(test.name, func(t *testing.T) {
			err := codegen.WrapBuiltInFunctionWrongArgs(test.funcName, 5)
			if err == nil {
				t.Errorf("%s should return error", test.name)
			}

			if !errors.Is(err, test.baseErr) {
				t.Errorf("%s should wrap %v", test.name, test.baseErr)
			}

			if !strings.Contains(err.Error(), "5") {
				t.Errorf("%s should contain argument count", test.name)
			}
		})
	}
}

func TestWrapBuiltInTwoArgs(t *testing.T) {
	err := codegen.WrapBuiltInTwoArgs("input")
	if err == nil {
		t.Error("WrapBuiltInTwoArgs should return error")
	}

	if !errors.Is(err, codegen.ErrBuiltInTwoArgs) {
		t.Error("Should wrap ErrBuiltInTwoArgs")
	}

	if !strings.Contains(err.Error(), "input") {
		t.Error("Should contain function name")
	}
}

func TestWrapFunctionNotFound(t *testing.T) {
	err := codegen.WrapUndefinedFunction("missingFunc")
	if err == nil {
		t.Error("WrapUndefinedFunction should return error")
	}

	if !errors.Is(err, codegen.ErrFunctionNotFound) {
		t.Error("Should wrap ErrFunctionNotFound")
	}

	if !strings.Contains(err.Error(), "missingFunc") {
		t.Error("Should contain function name")
	}
}

// Test error wrapping without position
func TestErrorWrappingWithoutPosition(t *testing.T) {
	// Use existing static error for testing
	errTest := codegen.ErrLLVMGenFailed

	tests := []struct {
		name        string
		wrapperFunc func() error
		expectedMsg string
	}{
		{
			"WrapUndefinedVariableWithPos nil position",
			func() error { return codegen.WrapUndefinedVariableWithPos("myVar", nil) },
			"undefined variable: myVar",
		},
		{
			"WrapFunctionArgsWithPos nil position for print",
			func() error { return codegen.WrapFunctionArgsWithPos("print", 1, 2, nil) },
			"function print expects 1 arguments, got 2: wrong argument count",
		},
		{
			"WrapFunctionArgsWithPos nil position for length",
			func() error { return codegen.WrapFunctionArgsWithPos("length", 1, 2, nil) },


#region License

// Copyright (c) 2013, ClearCanvas Inc.
// All rights reserved.
// http://www.clearcanvas.ca
//
// This file is part of the ClearCanvas RIS/PACS open source project.
//
// The ClearCanvas RIS/PACS open source project is free software: you can
// redistribute it and/or modify it under the terms of the GNU General Public
// License as published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// The ClearCanvas RIS/PACS open source project is distributed in the hope that it
// will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
// Public License for more details.
//
// You should have received a copy of the GNU General Public License along with
// the ClearCanvas RIS/PACS open source project.  If not, see
// <http://www.gnu.org/licenses/>.

#endregion

using System;

namespace ClearCanvas.Enterprise.Core
{
	/// <summary>
	/// Base class for <see cref="Entity"/>, <see cref="ValueObject"/> and <see cref="EnumValue"/>.
	/// </summary>
	///
	[Serializab


ymousColFrames");

    // create the new col frame
    nsIFrame* colFrame = NS_NewTableColFrame(shell, styleContext);
    ((nsTableColFrame *) colFrame)->SetColType(aColType);
    colFrame->Init(iContent, aColGroupFrame, nsnull);

    newColFrames.AppendFrame(nsnull, colFrame);
  }
  nsFrameList& cols = aColGroupFrame->GetWritableChildList();
  nsIFrame* oldLastCol = cols.LastChild();
  const nsFrameList::Slice& newCols =
    cols.InsertFrames(nsnull, oldLastCol, newColFrames);
  if (aAddToTable) {
    // get the starting col index in the cache
    PRInt32 startColIndex;
    if (oldLastCol) {
      startColIndex =
        static_cast<nsTableColFrame*>(oldLastCol)->GetColIndex() + 1;
    } else {
      startColIndex = aColGroupFrame->GetStartColumnIndex();
    }

    aColGroupFrame->AddColsToTable(startColIndex, true, newCols);
  }
}

void
nsTableFrame::MatchCellMapToColCache(nsTableCellMap* aCellMap)
{
  PRInt32 numColsInMap   = GetColCount();
  PRInt32 numColsInCache = mColFrames.Length();
  PRInt32 numColsToAdd = numColsInMap - numColsInCache;
  if (numColsToAdd > 0) {
    // this sets the child list, updates the col cache and cell map
    AppendAnonymousColFrames(numColsToAdd);
  }
  if (numColsToAdd < 0) {
    PRInt32 numColsNotRemoved = DestroyAnonymousColFrames(-numColsToAdd);
    // if the cell map has fewer cols than the cache, correct it
    if (numColsNotRemoved > 0) {
      aCellMap->AddColsAtEnd(numColsNotRemoved);
    }
  }
  if (numColsToAdd && HasZeroColSpans()) {
    SetNeedColSpanExpansion(true);
  }
  if (NeedColSpanExpansion()) {
    // This flag can be set in two ways -- either by changing
    // the number of columns (that happens in the block above),
    // or by adding a cell with colspan="0" to the cellmap.  To
    // handle the latter case we need to explicitly check the
    // flag here -- it may be set even if the number of columns
    // did not change.
    //
    // @see nsCellMap::AppendCell

    aCellMap->ExpandZeroColSpans();
  }
}

void
nsTableFrame::DidResizeColumns()
{
  NS_PRECONDITION(!GetPrevInFlow(),
                  "should only be called on first-in-flow");
  if (mBits.mResizedColumns)
    return; // already marked

  for (nsTableFrame *f = this; f;
       f = static_cast<nsTableFrame*>(f->GetNextInFlow()))
    f->mBits.mResizedColumns = true;
}

void
nsTableFrame::AppendCell(nsTableCellFrame& aCellFrame,
                         PRInt32           aRowIndex)
{
  nsTableCellMap* cellMap = GetCellMap();
  if (cellMap) {
    nsIntRect damageArea(0,0,0,0);
    cellMap->AppendCell(aCellFrame, aRowIndex, true, damageArea);
    MatchCellMapToColCache(cellMap);
    if (IsBorderCollapse()) {
      AddBCDamageArea(damageArea);
    }
  }
}

void nsTableFrame::InsertCells(nsTArray<nsTableCellFrame*>& aCellFrames,
                               PRInt32                      aRowIndex,
                               PRInt32                      aColIndexBefore)
{
  nsTableCellMap* cellMap = GetCellMap();
  if (cellMap) {
    nsIntRect damageArea(0,0,0,0);
    cellMap->InsertCells(aCellFrames, aRowIndex, aColIndexBefore, damageArea);
    MatchCellMapToColCache(cellMap);
    if (IsBorderCollapse()) {
      AddBCDamageArea(damageArea);
    }
  }
}

// this removes the frames from the col


九条 海域使用权期满，未申请续期或者申请续期未获批准的，海域使用权终止。

海域使用权终止后，原海域使用权人应当拆除可能造成海洋环境污染或者影响其他用海项目的用海设施和构筑物。

第三十条 因公共利益或者国家安全的需要，原批准用海的人民政府可以依法收回海域使用权。

依照前款规定在海域使用权期满前提前收回海域使用权的，对海域使用权人应当给予相应的补偿。

第三十一条 因海域使用权发生争议，当事人协商解决不成的，由县级以上人民政府海洋行政主管部门调解；当事人也可以直接向人民法院提起诉讼。

在海域使用权争议解决前，任何一方不得改变海域使用现状。

第三十二条 填海项目竣工后形成的土地，属于国家所有。

海域使用权人应当自填海项目竣工之日起三个月内，凭海域使用权证书，向县级以上人民政府土地行政主管部门提出土地登记申请，由县级以上人民政府登记造册，换发国有土地使用权证书，确认土地使用权。

## 第五章 海域使用金

第三十三条 国家实行海域有偿使用制度。

单位和个人使用海域，应当按照国务院的规定缴纳海域使用金。海域使用金应当按照国务院的规定上缴财政。

对渔民使用海域从事养殖活动收取海域使用金的具体实施步骤和办法，由国务院另行规定。

第三十四条 根据不同的用海性质或者情形，海域使用金可以按照规定一次缴纳或者按年度逐年缴纳。

第三十五条 下列用海，免缴海域使用金：

（一）军事用海；

（二）公务船舶专用码头用海；

（三）非经营性的航道、锚地等交通基础设施用海；

（四）教学、科研、防灾减灾、海难搜救打捞等非经营性公益事业用海。

第三十六条 下列用海，按照国务院财政部门和国务院海洋行政主管部门的规定，经有批准权的人民政府财政部门和海洋行政主管部门审查批准，可以减缴或者免


hu'nok.|
A Kaw the Mammoth Destroyer |QID|11879|PRE|11878|M|59.5,30.4|N|From Khu'nok.|
C Kaw the Mammoth Destroyer |QID|11879|N|Find a Wooly Mammoth Bull and right-click it to mount up. Go northwest to find Kaw the Mammoth Destroyer and kill him with the help of your mammoth. When he's dead, loot the item off the ground.|M|53.68,24.37|
A The Honored Ancestors |QID|11605|N|From Elder Atkanok at the Coldrock Quarry.|M|54.69,35.69|
A Reclaiming the Quarry |QID|11612|N|From Etaruk.|M|54.3,36.1|
C Reclaiming the Quarry |QID|11612|N|Kill Beryl Treasure Hunters.|S|
C Elder Sagani |QID|11605|QO|2|N|Identify Elder Sagani.|M|52.84,34.05|T|Elder Sagani|
C Elder Kesuk |QID|11605|QO|1|N|Identify Elder Kesuk.|M|50.81,32.38|T|Elder Kesuk|
C The Honored Ancestors |QID|11605|QO|3|N|Click the Elder here.|M|52.32,31.19|
T The Honored Ancestors |QID|11605|N|To Elder Atkanok.|M|54.69,35.69|
A The Lost Spirits |QID|11607|PRE|11605|N|From Elder Atkanok.|M|54.69,35.69|
C The Lost Spirits |QID|11607|U|34711|N|Kill Beryl Hounds and use the Cores of Malice on the Tuskarr in the quarry.|M|51.5,31.4|
C Reclaiming the Quarry |QID|11612|N|Kill Beryl Treasure Hunters.|US|
T The Lost Spirits |QID|11607|N|To Elder Atkanok.|M|54.69,35.69|
A Picking Up the Pieces |QID|11609|PRE|11607|N|From Elder Atkanok|M|54.69,35.69|
C Picking Up the Pieces |QID|11609|N|Pick up Tuskarr Ritual Objects.|M|53.1,33.3|S|
T Reclaiming the Quarry |QID|11612|N|To Etaruk|M|54.3,36.1|
A Hampering Their Escape |QID|11617|PRE|11612|N|From Etaruk|M|54.3,36.1|
C East Platform |ACTIVE|11617|QO|1|U|34772|N|Kill Beryl Reclaimers until you get a grenade and throw it at the East Platform here.|M|52.44,35.31|
C West Platform |ACTIVE|11617|QO|3|U|34772|N|Kill Beryl Reclaimers until you get a grenade and throw it at the West Platform here.|M|50.48,34.84|
C Hampering Their Escape |QID|11617|QO|2|U|34772|N|Kill Beryl Reclaimers until you get a grenade and throw it at the North Platform here.|M|51.91,31.86|
C Picking Up the Pieces |QID|11609|N|Pick up Tuskarr Ritual Objects.|M|53.1,33.3|US|
T Picking Up the Pieces |QID|11609|N|To Elder Atkanok|M|54.69,35.69|
A Leading the Ancestors Home |QID|11610|PRE|11609|N|From Elder Atkanok|M|54.69,35.69|
T Hampering Their Escape |QID|11617|N|To Etaruk|M|54


.m_fSunShaftsIntensity;
		RCache.set_c	(C, fValue, fValue, fValue, 0);
	}
}	binder_sun_shafts_intensity;

static class cl_alpha_ref	: public R_constant_setup
{
	virtual void setup (R_constant* C)
	{
		StateManager.BindAlphaRef(C);
	}
} binder_alpha_ref;

extern ENGINE_API BOOL r2_sun_static;
extern ENGINE_API BOOL r2_advanced_pp;	//	advanced post process and effects
//////////////////////////////////////////////////////////////////////////
// Just two static storage
void					CRender::create					()
{
	Device.seqFrame.Add	(this,REG_PRIORITY_HIGH+0x12345678);

	m_skinning			= -1;
	m_MSAASample		= -1;

	// hardware
	o.smapsize			= 1536;
	o.mrt				= (HW.Caps.raster.dwMRT_count >= 3);
	o.mrtmixdepth		= (HW.Caps.raster.b_MRT_mixdepth);

	// Check for NULL render target support
	//	DX10 disabled
	//D3DFORMAT	nullrt	= (D3DFORMAT)MAKEFOURCC('N','U','L','L');
	//o.nullrt			= HW.support	(nullrt,			D3DRTYPE_SURFACE, D3DUSAGE_RENDERTARGET);
	o.nullrt = false;
	/*
	if (o.nullrt)		{
	Msg				("* NULLRT supported and used");
	};
	*/
	if (o.nullrt)		{
		Msg				("* NULLRT supported");

		//.	    _tzset			();
		//.		??? _strdate	( date, 128 );	???
		//.		??? if (date < 22-march-07)
		if (0)
		{
			u32 device_id	= HW.Caps.id_device;
			bool disable_nullrt = false;
			switch (device_id)
			{
			case 0x190:
			case 0x191:
			case 0x192:
			case 0x193:
			case 0x194:
			case 0x197:
			case 0x19D:
			case 0x19E:{
				disable_nullrt = true;	//G80
				break;
					   }
			case 0x400:
			case 0x401:
			case 0x402:
			case 0x403:
			case 0x404:
			case 0x405:
			case 0x40E:
			case 0x40F:{
				disable_nullrt = true;	//G84
				break;
					   }
			case 0x420:
			case 0x421:
			case 0x422:
			case 0x423:
			case 0x424:
			case 0x42D:
			case 0x42E:
			case 0x42F:{
				disable_nullrt = true;	// G86
				break;
					   }
			}
			if (disable_nullrt)	o.nullrt=false;
		};
		if (o.nullrt)	Msg				("* ...and used");
	};

	// SMAP / DST
	o.HW_smap_FETCH4	= FALSE;
	//	DX10 disabled
	//o.HW_smap			= HW.support	(D3DFMT_D24X8,			D3DRTYPE_TEXTURE,D3DUSAGE_DEPTHSTENCIL);
	o.HW_smap			= true;
	o.HW_smap_PCF		= o.HW_smap		;
	if (o.HW_smap)
	{
		//	For ATI it's much faster on DX10 to use D32F format
		if (HW.Caps.id_vendor==0x1002)
			o.HW_smap_FORMAT	= D3DFMT_D32F_LOCKABLE;
		else
			o.HW_smap_FORMAT	= D3DFMT_D24X8;
		Msg				("* HWDST/


Release: 1.11.3

                © Copyright 1985-2013, MIT.

                    Contents
                     |
                    previous
                     |
                    next
                     |
                    index
                     |
                    Search
                     |
                    feedback

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>KRB5_KEYUSAGE_APP_DATA_CKSUM — MIT Kerberos Documentation</title>

    <link rel="stylesheet" href="../../../_static/agogo.css" type="text/css" />
    <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="../../../_static/kerb.css" type="text/css" />

    <link rel="author" title="About these documents" href="../../../about.html" />
    <link rel="copyright" title="Copyright" href="../../../copyright.html" />
    <link rel="top" title="MIT Kerberos Documentation" href="../../../index.html" />
    <link rel="up" title="krb5 simple macros" href="index.html" />
    <link rel="next" title="KRB5_KEYUSAGE_APP_DATA_ENCRYPT" href="KRB5_KEYUSAGE_APP_DATA_ENCRYPT.html" />
    <link rel="prev" title="KRB5_KEYUSAGE_AD_SIGNEDPATH" href="KRB5_KEYUSAGE_AD_SIGNEDPATH.html" />

<a href="../../../index.html"


,1,0,1,1,0]) #原始标签（隐含状态）

#下面式测试的观测序列
X_test1=np.array([[0.2,0.4,0.6],[0.5,0.2,0.1],[0.1,0.4,0.6]]) #测试数据

# 定义HMM模型
model3 = hmm.GaussianHMM(n_components=2, covariance_type="full",n_iter=100)

# 使用标记序列进行训练
model3.fit(X)

#下面进行预测操作
print('似然为',model3.score(X_test1)) #输出观测序列的最大似然（AIC），可以用于检验模型的精度，选择适合的隐含状态变量
y_pred=model3.predict(X_test1)
y_prob=model3.predict_proba(X_test1) #概率分布预测
print(y_pred)

#下面可以根据模型生成类似的观测值序列(分别包括观测状态序列和隐含状态序列)
print(model3.sample(100)[0]) #观测状态序列
print(model3.sample(100)[1]) #隐含状态序列

#如果想进行一定程度的监督学习的话，应该还可以直接设置模型的参数(从原始的人工计算)
"""model3.startprob_ = startprob #初始概率分布
model3.transmat_ = transmat #转换概率矩阵
model3.means_ = means #每个类别的每个特征的均值（最好设置）n*m矩阵形状（n为隐含状态种类数，m为特征数）
model3.covars_ = covars """


String;
    }
    if (defaultBytes != null) {
      _result.defaultBytes = defaultBytes;
    }
    if (defaultNestedEnum != null) {
      _result.defaultNestedEnum = defaultNestedEnum;
    }
    if (defaultForeignEnum != null) {
      _result.defaultForeignEnum = defaultForeignEnum;
    }
    if (defaultImportEnum != null) {
      _result.defaultImportEnum = defaultImportEnum;
    }
    if (defaultStringPiece != null) {
      _result.defaultStringPiece = defaultStringPiece;
    }
    if (defaultCord != null) {
      _result.defaultCord = defaultCord;
    }
    if (oneofUint32 != null) {
      _result.oneofUint32 = oneofUint32;
    }
    if (oneofNestedMessage != null) {
      _result.oneofNestedMessage = oneofNestedMessage;
    }
    if (oneofString != null) {
      _result.oneofString = oneofString;
    }
    if (oneofBytes != null) {
      _result.oneofBytes = oneofBytes;
    }
    if (oneofLazyNestedMessage != null) {
      _result.oneofLazyNestedMessage = oneofLazyNestedMessage;
    }
    if (deceptivelyNamedList != null) {
      _result.deceptivelyNamedList = deceptivelyNamedList;
    }
    if (oneofNestedMessage2 != null) {
      _result.oneofNestedMessage2 = oneofNestedMessage2;
    }
    return _result;
  }
  factory TestAllTypesLite.fromBuffer($core.List<$core.int> i,
          [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(i, r);
  factory TestAllTypesLite.fromJson($core.String i,
          [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(i, r);
  @$core.Deprecated('Using this can add significant overhead to your binary. '
      'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
      'Will be removed in next major version')
  TestAllTypesLite clone() => TestAllTypesLite()..mergeFromMessage(this);
  @$core.Deprecated('Using this can add significant overhead to your binary. '
      'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
      'Will be removed in next major version')
  TestAllTypesLite copyWith(void Function(TestAllTypesLite) updates) =>
      super.copyWith((message) => updates(message as TestAllTypesLite))
          as TestAllTypesLite; // ignore: deprecated_member_use
  $pb.BuilderInfo get info_ => _i;
  @$core.pragma('dart2js:noInline')
  static TestAllTypesLite create() => TestAllTypesLite._();
  TestAllTypesLite createEmptyInstance() => create();
  static $pb.PbList<TestAllTypesLite> createRepeated() =>
      $pb.PbList<TestAllTypesLite>();
  @$core.pragma('dart2js:noInline')
  static TestAllTypesLite getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<TestAllTypesLite>(create);
  static TestAllTypesLite? _defaultInstance;

  Test


	//
	// The valid range for the threshold value is `0.5` to `1` (inclusive) which allows any value between half and all
	// of the eligible voters.
	Threshold Fraction `protobuf:"bytes,7,opt,name=threshold,proto3" json:"threshold"`
	// The quorum fraction of eligible voters is based on the total electorate weight and defines a threshold of
	// votes that must be exceeded before the acceptance threshold is applied.
	// This value requires any kind of votes and not only YES.
	//
	// The valid range for the threshold value is `0.5` to `1` (inclusive) which allows any value between half and all
	// of the eligible voters.
	Quorum *Fraction `protobuf:"bytes,8,opt,name=quorum,proto3" json:"quorum,omitempty"`
	// Address of this entity. Set during creation and does not change.
	Address github_com_iov_one_weave.Address `protobuf:"bytes,9,opt,name=address,proto3,casttype=github.com/iov-one/weave.Address" json:"address,omitempty"`
}

func (m *ElectionRule) Reset()         { *m = ElectionRule{} }
func (m *ElectionRule) String() string { return proto.CompactTextString(m) }
func (*ElectionRule) ProtoMessage()    {}
func (*ElectionRule) Descriptor() ([]byte, []int) {
	return fileDescriptor_24f6e3c5f1b82a85, []int{2}
}
func (m *ElectionRule) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *ElectionRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_ElectionRule.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalTo(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *ElectionRule) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ElectionRule.Merge(m, src)
}
func (m *ElectionRule) XXX_Size() int {
	return m.Size()
}
func (m *ElectionRule) XXX_DiscardUnknown() {
	xxx_messageInfo_ElectionRule.DiscardUnknown(m)
}

var xxx_messageInfo_ElectionRule proto.InternalMessageInfo

func (m *ElectionRule) GetMetadata() *weave.Metadata {
	if m != nil {
		return m.Metadata
	}
	return nil
}

func (m *ElectionRule) GetVersion() uint32 {
	if m != nil {
		return m.Version
	}
	return 0
}

func (m *ElectionRule) GetAdmin() github_com_iov_one_weave.Address {
	if m != nil {
		return m.Admin
	}
	return nil
}

func (m *ElectionRule) GetElectorateID() []byte {
	if m != nil {
		return m.ElectorateID
	}
	return nil
}

func (m *ElectionRule) GetTitle() string {
	if m != nil {
		return m.Title
	}
	return ""
}

func (m *ElectionRule) GetVotingPeriod() github_com_iov_one_weave.UnixDuration {
	if m != nil {
		return m.VotingPeriod
	}
	return 0
}

func (m *ElectionRule) GetThreshold() Fraction {
	if m != nil {
		return m.Threshold
	}
	return Fraction{}
}

func (m *ElectionRule) GetQuorum() *Fraction {
	if m != nil {
		return m.Quorum
	}
	return nil
}

func (m *ElectionRule) GetAddress() github_com_iov_one_weave.Address {
	if m != nil {
		return m.Address
	}
	return nil
}

// The Fraction type represents a numerator and denominator to enable higher precision threshol


/* -*- C++ -*-
*
*  direct_draw.h
*
*  Copyright (C) 2015 jh10001 <jh10001@live.cn>
*
*  This program is free software; you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation; either version 2 of the License, or
*  (at your option) any later version.
*
*  This program is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software
*  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
#pragma once
#include <SDL.h>

#define MAX_TEXTURE_NUM 16

class DirectDraw
{
    SDL_Texture *texture_info[MAX_TEXTURE_NUM] = {0};
public:
    void loadTexture(int no, const char *filename);
    void deleteTexture(int no);
    void draw(int no, int dx, int dy, int w, int h, int sx, int sy, int alpha = 255, bool add = false);
    void draw2(int no, int dcx, int dcy, int sx, int sy, int w, int h, float xs, float ys, float rot, int alpha, bool add = false);
    void fill(int lx, int ly, int rx, int ry, int r, int g, int b);
    void getTextureSize(int no, int &w, int &h);
    void present();
    void clear();
};


        assert_eq!(Sha1::digest(b"").to_hex_be(), EMPTY_SHA1);
        assert_eq!(Sha1::digest(b""), Sha1::from_hex_be(EMPTY_SHA1)?);
        Ok(())
    }

    #[test]
    fn test_sha1_hex_le() -> Result<()> {
        const EMPTY_SHA1_LE: &str = "0907d8af90186095efbf55320d4b6b5eeea339da";
        assert_eq!(Sha1::digest(b"").to_hex_le(), EMPTY_SHA1_LE);
        assert_eq!(Sha1::digest(b""), Sha1::from_hex_le(EMPTY_SHA1_LE)?);
        Ok(())
    }

    #[test]
    fn test_ripemd160_slice() -> Result<()> {
        const EMPTY_RIPEMD: [u8; 20] = hex!("9c1185a5c5e9fc54612808977ee8f548b2258d31");
        assert_eq!(Ripemd160::digest(b"").as_slice(), EMPTY_RIPEMD);
        assert_eq!(
            Ripemd160::digest(b""),
            Ripemd160::from_slice(&EMPTY_RIPEMD)?
        );
        assert_eq!(
            Error::ByteArrayError(ByteArrayError::InvalidSlice {
                expected: 20,
                actual: 2,
            })
            .to_string(),
            Ripemd160::from_slice(&[0, 0]).unwrap_err().to_string(),
        );
        Ok(())
    }

    #[test]
    fn test_ripemd160_hex_be() -> Result<()> {
        const EMPTY_RIPEMD: &str = "9c1185a5c5e9fc54612808977ee8f548b2258d31";
        assert_eq!(Ripemd160::digest(b"").to_hex_be(), EMPTY_RIPEMD);
        assert_eq!(
            Ripemd160::digest(b""),
            Ripemd160::from_hex_be(EMPTY_RIPEMD)?
        );
        Ok(())
    }

    #[test]
    fn test_ripemd160_hex_le() -> Result<()> {
        const EMPTY_RIPEMD_LE: &str = "318d25b248f5e87e9708286154fce9c5a585119c";
        assert_eq!(Ripemd160::digest(b"").to_hex_le(), EMPTY_RIPEMD_LE);
        assert_eq!(
            Ripemd160::digest(b""),
            Ripemd160::from_hex_le(EMPTY_RIPEMD_LE)?
        );
        Ok(())
    }

    #[test]
    fn test_sha256_slice() -> Result<()> {
        const EMPTY_SHA256: [u8; 32] =
            hex!("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855");
        assert_eq!(Sha256::digest(b"").as_slice(), EMPTY_SHA256);
        assert_eq!(Sha256::digest(b""), Sha256::from_slice(&EMPTY_SHA256)?);
        assert_eq!(
            Error::ByteArrayError(ByteArrayError::InvalidSlice {
                expected: 32,
                actual: 2,
            })
            .to_string(),
            Sha256::from_slice(&[0, 0]).unwrap_err().to_string(),
        );
        Ok(())
    }

    #[test]
    fn test_sha256_hex_be() -> Result<()> {
        const EMPTY_SHA256: &str =
            "e3b0c44298fc1c149afb


pf-heading .card-pf-time-frame-filter {
  margin-top: -5px;
}
.card-pf-heading-details {
  float: right;
  font-size: 10px;
}
.card-pf-subtitle {
  font-size: 16px;
  margin-top: 20px;
  margin-bottom: 10px;
}
[class^="col"] .card-pf-subtitle {
  margin-top: 0;
}
@media (max-width: 767px) {
  .card-pf-body [class^="col"] + [class^="col"] > .card-pf-subtitle {
    margin-top: 40px;
  }
}
.card-pf-title {
  font-size: 16px;
  font-weight: 400;
  margin: 20px 0;
  padding: 0;
}
.card-pf-aggregate-status .card-pf-title {
  font-size: 14px;
  margin: 10px 0 0;
}
.card-pf-aggregate-status .card-pf-title .fa,
.card-pf-aggregate-status .card-pf-title .fas,
.card-pf-aggregate-status .card-pf-title .far,
.card-pf-aggregate-status .card-pf-title .fab,
.card-pf-aggregate-status .card-pf-title .fal,
.card-pf-aggregate-status .card-pf-title .pficon {
  color: #292e34;
  font-size: 16px;
  margin-right: 7px;
}
.card-pf-title .card-pf-aggregate-status-count {
  font-size: 16px;
}
.card-pf-aggregate-status-mini .card-pf-title .card-pf-aggregate-status-count {
  display: block;
  font-size: 24px;
  font-weight: 300;
  margin-bottom: 3px;
}
.card-pf-aggregate-status-mini .card-pf-title {
  font-size: 12px;
  margin-top: 5px;
}
.card-pf-aggregate-status-mini .card-pf-title a {
  display: inline-block;
}
.card-pf-aggregate-status-mini .card-pf-title .fa,
.card-pf-aggregate-status-mini .card-pf-title .fas,
.card-pf-aggregate-status-mini .card-pf-title .far,
.card-pf-aggregate-status-mini .card-pf-title .fab,
.card-pf-aggregate-status-mini .card-pf-title .fal,
.card-pf-aggregate-status-mini .card-pf-title .pficon {
  font-size: 26px;
  margin-right: 0;
  min-width: 26px;
  position: absolute;
  left: 20px;
  text-align: center;
  top: 15px;
}
.card-pf-utilization-details {
  border-bottom: 1px solid #d1d1d1;
  display: table;
  margin: 12px 0 15px;
  padding: 0 0 15px;
  width: 100%;
}
.card-pf-utilization-details .card-pf-utilization-card-details-count,
.card-pf-utilization-details .card-pf-utilization-card-details-description {
  float: left;
  line-height: 1;
}
.card-pf-utilization-details .card-pf-utilization-card-details-count {
  font-size: 26px;
  font-weight: 300;
  margin-right: 10px;
}
.card-pf-utilization-details .card-pf-utilization-card-details-line-1,
.card-pf-utilization-details .card-pf-utiliza


alt="数独" loading="lazy">

数独

会員限定

クロスワード

会員限定

スリザーリンク

大手小町

発言小町

ヨミドクター

会員限定

連載小説

会員限定

人生案内

会員限定

むずむずパズル

<img src="/assets/images/heade


*/  sh    $zero, 0x26($v1)
/* 0245CC 800239CC 10800004 */  beqz  $a0, .L800239E0_ovl0
/* 0245D0 800239D0 00601025 */   move  $v0, $v1
/* 0245D4 800239D4 A4800028 */  sh    $zero, 0x28($a0)
/* 0245D8 800239D8 A085002A */  sb    $a1, 0x2a($a0)
/* 0245DC 800239DC A4800048 */  sh    $zero, 0x48($a0)
.L800239E0_ovl0:
/* 0245E0 800239E0 8C630000 */  lw    $v1, ($v1)
/* 0245E4 800239E4 5460FFF7 */  bnezl $v1, .L800239C4_ovl0
/* 0245E8 800239E8 8C640028 */   lw    $a0, 0x28($v1)
/* 0245EC 800239EC 8CC40040 */  lw    $a0, 0x40($a2)
/* 0245F0 800239F0 AFA20020 */  sw    $v0, 0x20($sp)
.L800239F4_ovl0:
/* 0245F4 800239F4 10800006 */  beqz  $a0, .L80023A10_ovl0
/* 0245F8 800239F8 8FA20020 */   lw    $v0, 0x20($sp)
/* 0245FC 800239FC 8CCE0038 */  lw    $t6, 0x38($a2)
/* 024600 80023A00 AC4E0000 */  sw    $t6, ($v0)
/* 024604 80023A04 8CCF0040 */  lw    $t7, 0x40($a2)
/* 024608 80023A08 ACC00040 */  sw    $zero, 0x40($a2)
/* 02460C 80023A0C ACCF0038 */  sw    $t7, 0x38($a2)
.L80023A10_ovl0:
/* 024610 80023A10 0C00B590 */  jal   osSetIntMask
/* 024614 80023A14 8FA4001C */   lw    $a0, 0x1c($sp)
/* 024618 80023A18 8FBF0014 */  lw    $ra, 0x14($sp)
/* 02461C 80023A1C 27BD0028 */  addiu $sp, $sp, 0x28
/* 024620 80023A20 03E00008 */  jr    $ra
/* 024624 80023A24 00000000 */   nop

.type func_80023990, @function
.size func_80023990, . - func_80023990

glabel func_80023A28
/* 024628 80023A28 27BDFFE8 */  addiu $sp, $sp, -0x18
/* 02462C 80023A2C AFBF0014 */  sw    $ra, 0x14($sp)
/* 024630 80023A30 00804025 */  move  $t0, $a0
/* 024634 80023A34 AFA80018 */  sw    $t0, 0x18($sp)
/* 024638 80023A38 0C00B590 */  jal   osSetIntMask
/* 02463C 80023A3C 24040001 */   li    $a0, 1
/* 024640 80023A40 3C078009 */  lui   $a3, %hi(D_800978E0) # $a3, 0x8009
/* 024644 80023A44 24E778E0 */  addiu $a3, %lo(D_800978E0) # addiu $a3, $a3, 0x78e0
/* 024648 80023A48 8CE30040 */  lw    $v1, 0x40($a3)
/* 0246


  }

        match Row::from_reader(self.file, &self.definitions.column_widths) {
            Ok(row) => Some(row),
            Err(e) => {
                eprintln!("reading data: {}", e);
                None
            }
        }
    }
}

#[derive(Debug)]
pub struct Row {
    null_values: Vec<bool>,
    data: Vec<Option<Vec<u8>>>,
}

impl Row {
    fn from_reader(
        mut reader: impl Read,
        column_widths: &Vec<u32>,
    ) -> Result<Self, Box<dyn Error>> {
        let mut data: Vec<Option<Vec<u8>>> = vec![];

        let null_values = Row::read_bitfield(&mut reader, &column_widths)?;

        for (index, width) in column_widths.iter().enumerate() {
            if null_values[index] {
                data.push(None);
                continue;
            }

            let mut column: Vec<u8> = vec![];

            let column_width = if *width == std::u32::MAX {
                read_u32(&mut reader)?
            } else {
                *width
            };

            for _ in 0..column_width {
                let value = read_u8(&mut reader)?;

                column.push(value);
            }

            data.push(Some(column));
        }

        Ok(Row { null_values, data })
    }

    fn read_bitfield(
        mut reader: &mut impl Read,
        column_widths: &Vec<u32>,
    ) -> Result<Vec<bool>, Box<dyn Error>> {
        let mut null_values: Vec<bool> = vec![];

        let bitfield_length =
            (column_widths.len() / 8) + if column_widths.len() % 8 == 0 { 0 } else { 1 };
        let bitfield = read_variable(&mut reader, bitfield_length as usize)?;

        for byte in bitfield.iter() {
            for i in (0..8).rev() {
                null_values.push(byte & (1 << i) != 0);
            }
        }

        Ok(null_values)
    }

    pub fn generate_output(
        &self,
        types: &ColumnTypes,
        tz_offset: i8,
    ) -> Result<Vec<String>, Box<dyn Error>> {
        let mut record: Vec<String> = vec![];

        for (index, column) in self.data.iter().enumerate() {
            let column_conversion = &types.column_conversions[index];

            let output =
                types.column_types[index].format_value(column, tz_offset, column_conversion);
            record.push(output);
        }

        Ok(record)
    }
}

#[cfg(test)]
mod tests {
    use std::fs::File;

    use crate::vertica_native_file::VerticaNativeFile;

    #[test]
    fn test_read_from_good_file() {
        let mut file = File::open("data/all-types.bin").unwrap();

        let file = VerticaNativeFile::from_reader(&mut file).unwrap();

        for row in file {
            assert_eq!(14, row.data.len());
        }
    }

    #[test]
    fn test_read_from_good_file_with_nulls() {
        let mut file = File::open("data/all-types-with-nulls.bin").unwrap();

        let file = VerticaNativeFile::from_reader(&mut file).unwrap();

        for row in file {
            assert_eq!(14, row.data.len());
        }
    }
}
use reqwest::header::{HeaderMap, HeaderValue};
use thiserror::Error;

use steam_language_gen::generated::enums::EResult;

#[derive(Debug, Error)]
pub enum SteamAPIError {
    #[error("`An error EResult was found: {1}`")]
    EResult(EResult, String),

    #[error("An X-error_message was


章伯钧可能不会受处分，如果不做部长，也会给他别的适当工作，并可能仍要农工民主党的黄琪翔来接替交通部长职务，因为这样作对共产党面子上也比较好看些。”他还挑拨的说：“现在对章、罗的斗争，是为了镇压学生，不这样就镇压不下去。”尤其，当交通部把他这个老牌右派分子揪出来以后，他还和杨逸棠经常联系，商谈对策。

   此外，吴绍澍对中共交通部机关党委会所召开的反击右派谬论座谈会，也极力进行阻挠。他唯恐暴露自己的右派面目，更进行了一系列逃避和破坏的阴谋活动。第一，在党委邀民主党派负责人商讨开座谈会时，他曾一度代表民革交通部支部出席，却以酝酿尚未成熟为借口，企图加以阻挠、破坏。第二，当座谈会决定召开，民革交通部支部动员原来出席整风座谈会的成员积极准备参加时，他竟在会上又提出可推派代表参加，继又主张联合发言，接着又当场要别人打电话给党委要求推迟，最后他又提出由民主党派自己开，请党委派员参加等荒谬主张，大施其逃避和破坏的诡计，但都并未得逞。第三，座谈会举行那天上午开会前，他利用别人事先准备好的发言稿作联合发言，并将稿内斥责章伯钧谬论的一段话删去，然后借故逃会，下午也不参加。第四，他原以为座谈会开一两次结束，逃过去就算了，不料继续开下去，后来只好勉强参加，但又怕利用别人的发言稿被人识破，所以只得凑了几句空洞的话作为书面发言，而始终不敢在座谈会上站出来说话。尤其恶劣的，他明知道他必然会遭到驳斥，所以他又托他反党小集团的一个成员替他将人家的发言记录下来，送给他看，以探究竟。

   四  企图夺取民革交通部支部领导权，篡改民革组织方针和路线

   （一）企图夺取民革交通部支部领导权


 join(await getDatabasesPath(), kLichessDatabaseName);
}

/// Returns the sqlite version as an integer.
@Riverpod(keepAlive: true)
Future<int?> sqliteVersion(Ref ref) async {
  final db = await ref.read(databaseProvider.future);
  return _getDatabaseVersion(db);
}

Future<int?> _getDatabaseVersion(Database db) async {
  try {
    final versionStr = (await db.rawQuery('SELECT sqlite_version()')).first.values.first.toString();
    final versionCells = versionStr.split('.').map((i) => int.parse(i)).toList();
    return versionCells[0] * 100000 + versionCells[1] * 1000 + versionCells[2];
  } catch (_) {
    return null;
  }
}

@Riverpod(keepAlive: true)
Future<int> getDbSizeInBytes(Ref ref) async {
  final dbPath = join(await getDatabasesPath(), kLichessDatabaseName);
  final dbFile = File(dbPath);

  return dbFile.length();
}

/// Opens the app database.
Future<Database> openAppDatabase(DatabaseFactory dbFactory, String path) {
  return dbFactory.openDatabase(
    path,
    options: OpenDatabaseOptions(
      version: 4,
      onConfigure: (db) async {
        final version = await _getDatabaseVersion(db);
        _logger.info('SQLite version: $version');
      },
      onOpen: (db) async {
        await Future.wait([
          _deleteOldEntries(db, 'puzzle', puzzleTTL),
          _deleteOldEntries(db, 'correspondence_game', corresGameTTL),
          _deleteOldEntries(db, 'game', gameTTL),
          _deleteOldEntries(db, 'chat_read_messages', chatReadMessagesTTL),
          _deleteOldEntries(db, 'http_log', httpLogTTL),
        ]);
      },
      onCreate: (db, version) async {
        final batch = db.batch();
        _createPuzzleBatchTableV3(batch);
        _createPuzzleTableV1(batch);
        _createCorrespondenceGameTableV1(batch);
        _createChatReadMessagesTableV1(batch);
        _createGameTableV2(batch);
        _createHttpLogTableV4(batch);
        await batch.commit();
      },
      onUpgrade: (db, oldVersion, newVersion) async {
        final batch = db.batch();
        if (oldVersion == 1) {
          _createGameTableV2(batch);
        }
        if (oldVersion < 3) {
          _updatePuzzleBatchTableToV3(batch);
        }
        if (oldVersion < 4) {
          _createHttpLogTableV4(batch);
        }
        await batch.commit();
      },
      onDowngrade: onDatabaseDowngradeDelete,
    ),
  );
}

void _createPuzzleBatchTableV3(Batch batch) {
  batch.execute('DROP TABLE IF EXISTS puzzle_batchs');
  batch.execute('''
    CREATE TABLE puzzle_batchs(
      userId TEXT NOT NULL,
      angle TEXT NOT NULL,
      lastModified TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
      data TEXT NOT NULL,
      PRIMARY KEY (userId, angle)
    )
    ''');
}

void _updatePuzzleBatchTableToV3(Batch batch) {
  batch.execute('''
    CREATE TABLE puzzle_batchs_new(
      userId TEXT NOT NULL,
      angle TEXT NOT NULL,
      lastModified TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
      data TEXT NOT NULL,
      PRIMARY KEY (userId, angle)
    )
    ''');
  batch.execute('''
    INSERT INTO puzzle_batchs_new(userId, angle, data)
    SELECT userId, angle, data FROM puzzle_batchs
    ''');
  batch.execute('DROP TABLE puzzle_batchs');
  batch.execute('ALTER TABLE puzzle_batchs_new RE


s set to yes">

Property
Limit
Total Size
Size
Entity Name

<tt>ENTITY_EXPANSION_LIMIT</tt>
64000
1417
0
<tt>null</tt>

<tt>MAX_OCCUR_NODE_LIMIT</tt>
5000
0
0
<tt>null</tt>

<tt>ELEMENT_ATTRIBUTE_LIMIT</tt>
10000
0
0
<tt>null</tt>

<tt>TOTAL_ENTITY_SIZE_LIMIT</tt>
50000000
55425
0
<tt>null</tt>

<tt>GENERAL_ENTITY_SIZE_LIMIT</tt>
0
0
0
<tt>null</tt>

<tt>PARAMETER_ENTITY_SIZE_LIMIT</tt>
1000000
0
7303
%MultiScriptExpression

<tt>MAX_ELEMENT_DEPTH_LIMIT</tt>
0
2
0
<tt>null</tt>

<tt>MAX_NAME_LIMIT</tt>
1000
13
13
<tt>null</tt>

<tt>ENTITY_REPLACEMENT_LIMIT</tt>
3000000
0
0
<tt>null</tt>

In this example, the total number of entity references, or the entity expansion, is 1417; the default limit is 64000. The total size of all entities is 55425; the default limit is 50000000. The biggest parameter entity is <tt>%MultiScriptExpression</tt> with a length of 7303 after all references are resolved; the default limit is 1000000.

If this is the largest file that the application is expected to process, it is recommended that the limits be set to smaller numbers. For example, 2000 for <tt>ENTITY_EXPANSION_LIMIT</tt>, 100000 for <tt>TOTAL_ENTITY_SIZE_LIMIT</tt>, and 10000 for <tt>PARAMETER_ENTITY_SIZE_LIMIT</tt>.

Setting Limits

Limits can be set in the same way as other JAXP properties. They can be set through factory methods, or through the parser:

DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setAttribute(name, value);

SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParser parser = spf.newSAXParser();
parser.setProperty(name, value);

XMLInputFactory xif = XMLInputFactory.newInstance();
xif.setProperty(name, value);

SchemaFactory schemaFactory = SchemaFactory.newInstance(schemaLanguage);
schemaFactory.setProperty(name, value);

TransformerFactory factory = TransformerFactory.newInstance();
factory.setAttribute(name, value);

The following example shows how to set limits using <tt>DocumentBuilderFactory</tt>:

dbf.setAttribute(JDK_ENTITY_EXPANSION_LIMIT, "2000");
dbf.setAttribute(TOTAL_ENTITY_SIZE_LIMIT, "100000");
dbf.setAttribute(PARAMETER_ENTITY_SIZE_LIMIT, "10000");
dbf.setAttribute(JDK_MAX_ELEMENT_DEPTH, "100");


.Count; j++)
                        {
                            //查重
                            if (list_Song_Info[i].Song_Url.Equals(songList_Infos[ComBox_Select][0].Songs[j].Song_Url))
                                break;
                            //无重复，则添加
                            if (j == songList_Infos[ComBox_Select][0].Songs.Count - 1)
                                songList_Infos[ComBox_Select][0].Songs.Add(list_Song_Info[i]);
                        }
                    }
                    else
                    {
                        songList_Infos[ComBox_Select][0].Songs.Add(list_Song_Info[i]);
                    }
                }
                //排序
                //songList_Infos[ComBox_Select][0].Songs = songList_Infos[ComBox_Select][0].Songs.OrderBy(s => s.Singer_Name + s.Song_Name).ToList();
                for (int i = 0; i < songList_Infos[ComBox_Select][0].Songs.Count; i++)
                {
                    songList_Infos[ComBox_Select][0].Songs[i].Song_No = i + 1;
                }
            }

            //保存歌单信息
            Save_SongListInfoAsync();
        }

        private void Back_Windows_Click(object sender, RoutedEventArgs e)
        {
            ListBox_Test.Items.Clear();
            list_Song_Info.Clear();
            All_Song_Path = new ArrayList();
            All_Info_Path = new ArrayList();

            this.Visibility = Visibility.Collapsed;
        }

        public int ComBox_Select;
        private void ComBox_Select_SongList_Selected(object sender, SelectionChangedEventArgs e)
        {
            ComBox_Select = ComBox_Select_SongList.SelectedIndex;
        }

        public ArrayList Selects_SongList = new ArrayList();
        /// <summary>
        /// 添加要扫描的歌曲文件夹
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Button_Add_SongList_Click(object sender, RoutedEventArgs e)
        {
            using (FolderBrowserDialog folderDialog = new FolderBrowserDialog())
            {
                folderDialog.ShowDialog();

                Selects_SongList.Add(folderDialog.SelectedPath);
                ListBox_Selects_SongList.Items.Add(folderDialog.SelectedPath);
            }
        }

        private void SearchAudioFilesInFolder(string folderPath)
        {
            DirectoryInfo directory = new DirectoryInfo(folderPath);
            FileInfo[] audioFiles = directory.GetFiles("*.*", SearchOption.AllDirectories)
                .Where(file => IsAudioFile(file.Extension))
                .ToArray();

            foreach (FileInfo audioFile in audioFiles)
            {
                All_Info_Path.Add(audioFile.FullName);
            }
        }

        static bool IsAudioFile(string extension)
        {
            string[] audioExtensions = { ".mp3", ".wav", ".flac" };
            return audioExtensions.Contains(extension, StringComparer.OrdinalIgnoreCase);
        }

        /// <summary>
        /// 保存歌单信息
        /// </


171 -2.582,2.208 2.582,2.175 0,-2.139 2.586,2.155 0,-1.276 c 3.138,0.129 5.491,2.681 5.543,5.838 l -1.031,0 0.016,0.215 1.015,0 c -0.06,3.19 -2.629,5.765 -5.819,5.833 l 0,-1.018 -0.214,0 0,1.021 c -3.21,-0.047 -5.801,-2.631 -5.862,-5.836 l 1.045,0 -0.016,-0.215 -1.045,0 c -0.052,-0.288 -0.318,-0.654 -0.766,-0.654 -0.538,0 -0.755,0.484 -0.755,0.75 0,4.146 3.331,7.506 7.476,7.506 4.146,0 7.506,-3.36 7.506,-7.506 0,-4.059 -3.066,-7.357 -7.093,-7.493" fill="url(#gradient)"/><path d="m 5.1729,11.0518 c -0.38,0 -0.668,-0.129 -0.945,-0.366 -0.083,-0.071 -0.186,-0.134 -0.338,-0.134 -0.277,0 -0.511,0.238 -0.511,0.521 0,0.154 0.083,0.301 0.179,0.383 0.394,0.346 0.911,0.563 1.601,0.563 1.077,0 1.739,-0.681 1.739,-1.608 l 0,-0.013 c 0,-0.911 -0.641,-1.265 -1.296,-1.376 l 0.945,-0.919 c 0.193,-0.19 0.317,-0.337 0.317,-0.604 0,-0.294 -0.228,-0.477 -0.538,-0.477 l -2.354,0 c -0.248,0 -0.455,0.21 -0.455,0.464 0,0.253 0.207,0.463 0.455,0.463 l 1.485,0 -0.939,0.961 c -0.166,0.169 -0.228,0.295 -0.228,0.444 0,0.25 0.207,0.463 0.455,0.463 l 0.166,0 c 0.594,0 0.945,0.222 0.945,0.624 l 0,0.012 c 0,0.367 -0.282,0.599 -0.683,0.599" fill="url(#gradient)"/><path d="m 10.354,9.5342 c 0,0.876 -0.379,1.525 -0.979,1.525 -0.599,0 -0.992,-0.655 -0.992,-1.539 l 0,-0.012 c 0,-0.884 0.388,-1.527 0.979,-1.527 0.592,0 0.992,0.663 0.992,1.539 l 0,0.014 z m -0.979,-2.512 c -1.197,0 -2.008,1.097 -2.008,2.498 l 0,0.014 c 0,1.401 0.792,2.484 1.995,2.484 1.205,0 2.01,-1.097 2.01,-2.498 l 0,-0.012 c 0,-1.402 -0.805,-2.486 -1.997,-2.486" fill="url(#gradient)"/></svg>');
    width: 16px;
    height: 18px;
    margin-bottom: 1px;
    margin-left: 6px;
    margin-right: 4px;
}

video::-webkit-media-controls-play-button,
audio::-webkit-media-controls-play-button {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15"><linearGradient id="gradient" x2="0" y2="100%" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="rgb(216, 216, 216)"/><stop offset="0.4375" stop-color="rgb(216, 216, 216)"/><stop offset="0.4375" stop-color="rgb(208, 208, 208)"/><stop offset="0.5" stop-color="rgb(208, 208, 208)"/><stop offset="0.5" stop-color="rgb(200, 200,


 utils.AzureRmAndRequiredProviders)
	require.NoError(t, err)
	defer test.Cleanup()

	// We want 8 resources here, 2 more than the TestVirtualNetworkCreateValid test
	resources := []string{
		"module.virtual_networks[\"primary\"].azapi_resource.vnet",
		"module.virtual_networks[\"primary\"].module.subnet[\"default\"].azapi_resource.subnet",
		"module.virtual_networks[\"secondary\"].azapi_resource.vnet",
		"module.virtual_networks[\"secondary\"].module.subnet[\"default\"].azapi_resource.subnet",
	}
	check.InPlan(test.PlanStruct).NumberOfResourcesEquals(len(resources)).ErrorIsNilFatal(t)

	for _, r := range resources {
		check.InPlan(test.PlanStruct).That(r).Exists().ErrorIsNil(t)
	}

	vns := v["virtual_networks"].(map[string]map[string]any)
	for k, v := range vns {
		res := fmt.Sprintf("module.virtual_networks[\"%s\"]", k)
		subnets, exists := v["subnets"].(map[string]map[string]any)
		if exists {
			for subnetKey, subnetVal := range subnets {
				subnetRes := fmt.Sprintf("%s.module.subnet[\"%s\"].azapi_resource.subnet", res, subnetKey)
				terraform.RequirePlannedValuesMapKeyExists(t, test.PlanStruct, subnetRes)
				check.InPlan(test.PlanStruct).That(subnetRes).Key("name").HasValue(subnetVal["name"]).ErrorIsNil(t)
				check.InPlan(test.PlanStruct).That(subnetRes).Key("body").Query("properties.addressPrefixes").HasValue(subnetVal["address_prefixes"]).ErrorIsNil(t)
			}
		}
	}
}

// TestVirtualNetworkCreateValidWithMultiplSubnetsInSingleVnet tests the creation of a plan that
// creates a virtual network with multiple subnets and another virtual network without subnets.
func TestVirtualNetworkCreateValidWithMultiplSubnetsInSingleVnet(t *testing.T) {

	v := getMockInputVariables()

	// Enable primary vnet subnet in test mock input variables
	primaryvnet := v["virtual_networks"].(map[string]map[string]any)["primary"]
	primaryvnet["subnets"] = map[string]map[string]any{
		"default": {
			"name":             "snet-default",
			"address_prefixes": []any{"192.168.0.0/26"},
		},
		"privateendpoint": {
			"name":             "snet-privateendpoint",
			"address_prefixes": []any{"192.168.0.64/26"},
		},
	}

	test, err := setuptest.Dirs(moduleDir, "").WithVars(v).InitPlanShowWithPrepFunc(t, utils.AzureRmAndRequiredProviders)
	require.NoError(t, err)
	defer test.Cleanup()

	// We want 8 resources here, 2 more than the TestVirtualNetworkCreateValid test
	resources := []string{
		"module.virtual_networks[\"primary\"].azapi_resource.vnet",
		"module.virtual_networks[\"primary\"].module.subnet[\"default\"].azapi_resource.subnet",
		"module.virtual_networks[\"primary\"].module.subnet[\"privateendpoint\"].azapi_resource.subnet",
		"module.virtual_networks[\"secondary\"].azapi_resource.vnet",
	}
	check.InPlan(test.PlanStruct).NumberOfResourcesEquals(len(resources)).ErrorIsNilFatal(t)

	for _, r := range resources {
		check.InPlan(test.PlanStruct).That(r).Exists().ErrorIsNil(t)
	}

	vns := v["virtual_networks"].(map[


图片等"#}{#/InputSlot#}。
3. 风格：{#InputSlot placeholder="你所希望的智能体回复风格"#}你必须确保你的回答准确无误、并且言简意赅、容易理解。你必须进行专业和确定性的回复。{#/InputSlot#}
4. 语言：{#InputSlot placeholder="你所希望的智能体回复语言"#}你应该用与用户输入相同的语言回答。{#/InputSlot#}
5. 回答长度：你的答案应该{#InputSlot placeholder="回答长度描述，比如简洁清晰或详细丰富"#}简洁清晰{#/InputSlot#}，不超过{#InputSlot placeholder="回答字数限制"#}300{#/InputSlot#}字。
6. 一定要使用 {#InputSlot placeholder="回答格式要求，比如Markdown"#}Markdown{#/InputSlot#} 格式回复。

## 问答示例
### 示例1 正常问答
用户问题：{#InputSlot placeholder="用户问题举例1"#}{#/InputSlot#}
你的答案：{#InputSlot placeholder="你的答案举例1，可以包括对应问题的回答，对于用户的行为指引，甚至提供相关的文档链接。"#}{#/InputSlot#}
### 示例2 正常问答
用户问题：{#InputSlot placeholder="用户问题举例2"#}{#/InputSlot#}
你的答案：{#InputSlot placeholder="你的答案举例2，可以包括对应问题的回答，对于用户的行为指引，甚至提供相关的文档链接。"#}{#/InputSlot#}
### 示例3 用户意图不明确
用户问题：{#InputSlot placeholder="用户意图不明确的问题举例"#}{#/InputSlot#}
你的答案：{#InputSlot placeholder="应对不明确问题的答案举例，比如可以追问用户一些问题以明确用户意图，比如你想了解关于xx的哪些信息呢？请详细描述你的问题，以便于我可以更好的帮助你。"#}{#/InputSlot#}`,
	},
	{
		ID:          10006,
		Name:        "使用Jinja语法",
		Description: "以生成生图提示词的设计师为例，可以试试在提示词中使用Jinja语法来提升提示词书写效率。",
		PromptText: `{# 可以在提示词中使用Jinja语法，使用场景比如：
一、写注释：比如此段灰色的话就是注释，注释最终不会作为提示词送给模型，也不实际消耗token，可以用于撰写提示词中的使用说明指引等。
二、使用语句：可以通过以下语句设置变量，完成整体提示词中的高频修改内容的快速更改。#}
{% set designer_type = "平面设计师


 *Parser) Import(pkgpath string, ways string) error {
	if !strings.HasSuffix(pkgpath, "/...") {
		return g.importOnce(pkgpath)
	}

	if ways != "" {
		for _, way := range strings.Split(ways, ",") {
			g.ways[way] = true
		}
	}

	pkgs := utils.PackageOmitted(pkgpath)
	for _, out := range pkgs {
		err := g.importOnce(out)
		if err != nil {
			return err
		}
	}

	return nil
}

func (g *Parser) isWay(way string) bool {
	if way == "" {
		return true
	}
	pre := 0
	for i, c := range way {
		if c == ',' {
			if g.ways[way[pre:i]] {
				return true
			}
			pre = i + 1
		}
	}
	return g.ways[way[pre:]]
}

func (g *Parser) importChild(pkgpath string, src string, name string) (gotype.Type, bool) {
	t, ok := g.consts[name]
	if ok {
		return t, true
	}

	pkg, err := g.imp.Import(pkgpath, src)
	if err != nil {
		return nil, false
	}
	return pkg.ChildByName(name)
}

func (g *Parser) importOnce(pkgpath string) error {
	src, err := os.Getwd()
	if err != nil {
		return err
	}
	pkg, err := g.imp.Import(pkgpath, src)
	if err != nil {
		return err
	}
	g.api.Imports = append(g.api.Imports, pkg.PkgPath())
	g.api.Package = pkg.Name()
	numchi := pkg.NumChild()

	for i := 0; i != numchi; i++ {
		v := pkg.Child(i)
		if !IsExported(v.Name()) {
			continue
		}
		switch v.Kind() {
		case gotype.Declaration:
			if len(g.ways) != 0 {
				doc := v.Doc().Text()
				_, tag := utils.GetTag(doc)
				if !g.isWay(tag.Get("way")) {
					continue
				}
			}
			err = g.addWrapping(src, nil, v)
			if err != nil {
				return err
			}
			err = g.addMiddleware(src, nil, v)
			if err != nil {
				return err
			}
			err = g.addSecurity(src, nil, v)
			if err != nil {
				return err
			}
			err = g.addOperation(src, "", nil, v, nil)
			if err != nil {
				return err
			}
		default:

			if len(g.ways) != 0 {
				doc := v.Doc().Text()
				_, tag := utils.GetTag(doc)
				if !g.isWay(tag.Get("way")) {
					continue
				}
			}

			err = g.addPaths(src, v)
			if err != nil {
				return err
			}
		case gotype.Scope, gotype.Invalid:
			// No action
		}
	}

	return nil
}

func (g *Parser) addPaths(src string, t gotype.Type) (err error) {
	_, tag := utils.GetTag(t.Doc().Text())
	if tag == "" {
		return nil
	}
	path := tag.Get("path")
	if path == "" {
		return nil
	}

	sch, err := g.addType(src, t)
	if err != nil {
		return err
	}

	filter := map[string]bool{}
	return g.addMethods(src, path, sch, t, nil, filter)
}

func (g *Parser) addMethods(src string, basePath string, sch *spec.Type, t gotype.Type, chain []string, filter map[st


6RunTag\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" +
      "(\t\"+\n\rExperimentTag\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" +
      "e\030\002 \001(\t\"\335\001\n\007RunInfo\022\016\n\006run_id\030\017 \001(\t\022\020\n\010r" +
      "un_uuid\030\001 \001(\t\022\020\n\010run_name\030\003 \001(\t\022\025\n\rexper" +
      "iment_id\030\002 \001(\t\022\017\n\007user_id\030\006 \001(\t\022!\n\006statu" +
      "s\030\007 \001(\0162\021.mlflow.RunStatus\022\022\n\nstart_time" +
      "\030\010 \001(\003\022\020\n\010end_time\030\t \001(\003\022\024\n\014artifact_uri" +
      "\030\r \001(\t\022\027\n\017lifecycle_stage\030\016 \001(\t\"\273\001\n\nExpe" +
      "riment\022\025\n\rexperiment_id\030\001 \001(\t\022\014\n\004name\030\002 " +
      "\001(\t\022\031\n\021artifact_location\030\003 \001(\t\022\027\n\017lifecy" +
      "cle_stage\030\004 \001(\t\022\030\n\020last_update_time\030\005 \001(" +
      "\003\022\025\n\rcreation_time\030\006 \001(\003\022#\n\004tags\030\007 \003(\0132\025" +
      ".mlflow.ExperimentTag\"V\n\014DatasetInput\022\036\n" +
      "\004tags\030\001 \003(\0132\020.mlflow.InputTag\022&\n\007dataset" +
      "\030\002 \001(\0132\017.mlflow.DatasetB\004\370\206\031\001\"$\n\nModelIn" +
      "put\022\026\n\010model_id\030\001 \001(\tB\004\370\206\031\001\"2\n\010InputTag\022" +
      "\021\n\003key\030\001 \001(\tB\004\370\206\031\001\022\023\n\005value\030\002 \001(\tB\004\370\206\031\001\"" +
      "\205\001\n\007Dataset\022\022\n\004name\030\001 \001(\tB\004\370\206\031\001\022\024\n\006diges" +
      "t\030\002 \001(\tB\004\370\206\031\001\022\031\n\013source_type\030\003 \001(\tB\004\370\206\031\001" +
      "\022\024\n\006source\030\004 \001(\tB\004\370\206\031\001\022\016\n\006schema\030\005 \001(\t\022\017" +
      "\n\007profile\030\006 \001(\t\"9\n\013ModelOutput\022\026\n\010model_" +
      "id\030\001 \001(\tB\004\370\206\031\001\022\022\n\004step\030\002 \001(\003B\004\370\206\031\001\"\266\001\n\020C" +
      "reateExperiment\022\022\n\004name\030\001 \001(\tB\004\370\206\031\001\022\031\n\021a" +
      "rtifact_location\030\002 \001(\t\022#\n\004tags\030\003 \003(\0132\025.m" +
      "lflow.ExperimentTag\032!\n\010Response\022\025\n\rexper" +
      "iment_id\030\001 \001(\t:+\342?(\n&com.databricks.rpc." +


Offset, C_INT64_SIZE, true);

        // Be a little resilient
        Long oldValue = lookupLongConstant(name, false);
        if (oldValue == null) {
          addLongConstant(name, value);
        } else {
          if (oldValue.longValue() != value) {
            throw new RuntimeException("Error: the long constant \"" + name +
                                       "\" had its value redefined (old was " + oldValue +
                                       ", new is " + value + ". Aborting.");
          } else {
            System.err.println("Warning: the long constant \"" + name + "\" (declared in the remote VM in VMStructs::localHotSpotVMLongConstants) " +
                               "had its value declared as " + value + " twice. Continuing.");
            duplicateDefCount++;
          }
        }
      }

      entryAddr = entryAddr.addOffsetTo(longConstantEntryArrayStride);
    } while (nameAddr != null && duplicateDefCount < MAX_DUPLICATE_DEFINITIONS);

    if (duplicateDefCount >= MAX_DUPLICATE_DEFINITIONS) {
      throw new RuntimeException("too many duplicate definitions.");
    }
  }

  private BasicType lookupOrFail(String typeName) {
    BasicType type = (BasicType) lookupType(typeName, false);
    if (type == null) {
      throw new RuntimeException("Type \"" + typeName + "\", referenced in VMStructs::localHotSpotVMStructs in the remote VM, " +
                                 "was not present in the remote VMStructs::localHotSpotVMTypes table (should have been caught " +
                                 "in the debug build of that VM). Can not continue.");
    }
    return type;
  }

  private long getLongValueFromProcess(String symbol) {
    return lookupInProcess(symbol).getCIntegerAt(0, C_INT64_SIZE, true);
  }

  private Address lookupInProcess(String symbol) throws NoSuchSymbolException {
    // FIXME: abstract away the loadobject name
    for (int i = 0; i < jvmLibNames.length; i++) {
      Address addr = symbolLookup.lookup(jvmLibNames[i], symbol);
      if (addr != null) {
        return addr;
      }
    }
    String errStr = "(";
    for (int i = 0; i < jvmLibNames.length; i++) {
      errStr += jvmLibNames[i];
      if (i < jvmLibNames.length - 1) {
        errStr += ", ";
      }
    }
    errStr += ")";
    throw new NoSuchSymbolException(symbol,
                                    "Could not find symbol \"" + symbol +
                                    "\" in any of the known library names " +
                                    errStr);
  }

  private BasicType lookupOrCreateClass(String typeName, boolean isOopType,
                                        boolean isIntegerType, boolean isUnsigned) {
    BasicType type = (BasicType) lookupType(typeName, false);
    if (type == null) {
      // Create a new type
      type = createBasicType(typeName, isOopType, isIntegerType, isUnsigned);
    }
    return type;
  }

  /** Creates a new BasicType, initializes its size to -1 so we can
      test to ensure that all types' sizes are initialized by VMTypes,
      and adds it to the database. Takes care of initializing integer
      and oop types properly. */
  private BasicType createBasicType(String typeName, boolean isOopType,
                                    boolean isIntegerType, boolean isUnsigned) {

    BasicType type = null;

    if (isIntegerType) {
      type = new BasicCIntegerType(this, typeName, isUnsigned);
    } else {
      if (typeNameIsPointerType(typeName)) {
        type = recursiveCreateBasicPointerType(typeName);
      } else {
        type = new BasicType(this, typeName);
      }

      if (isOopType) {
        // HACK: turn markOop into a C integer type. This allows
        // proper handling of it in the Serviceability Agen


]
pub fn mat3(x_axis: Vec3, y_axis: Vec3, z_axis: Vec3) -> Mat3 {
    Mat3 {
        x_axis,
        y_axis,
        z_axis,
    }
}

/// A 3x3 column major matrix.
#[derive(Clone, Copy, PartialEq, PartialOrd, Debug)]
pub struct Mat3 {
    pub x_axis: Vec3,
    pub y_axis: Vec3,
    pub z_axis: Vec3,
}

impl Default for Mat3 {
    #[inline]
    fn default() -> Self {
        Self::identity()
    }
}

impl Mat3 {
    /// Creates a 3x3 matrix with all elements set to `0.0`.
    #[inline]
    pub const fn zero() -> Self {
        Self {
            x_axis: Vec3::zero(),
            y_axis: Vec3::zero(),
            z_axis: Vec3::zero(),
        }
    }

    /// Creates a 3x3 identity matrix.
    #[inline]
    pub const fn identity() -> Self {
        Self {
            x_axis: Vec3::new(1.0, 0.0, 0.0),
            y_axis: Vec3::new(0.0, 1.0, 0.0),
            z_axis: Vec3::new(0.0, 0.0, 1.0),
        }
    }

    /// Creates a 3x3 matrix from three column vectors.
    #[inline]
    pub fn from_cols(x_axis: Vec3, y_axis: Vec3, z_axis: Vec3) -> Self {
        Self {
            x_axis,
            y_axis,
            z_axis,
        }
    }

    /// Creates a 3x3 matrix from a `[f32; 9]` stored in column major order.
    /// If your data is stored in row major you will need to `transpose` the
    /// returned matrix.
    #[inline]
    pub fn from_cols_array(m: &[f32; 9]) -> Self {
        Self {
            x_axis: Vec3::new(m[0], m[1], m[2]),
            y_axis: Vec3::new(m[3], m[4], m[5]),
            z_axis: Vec3::new(m[6], m[7], m[8]),
        }
    }

    /// Creates a `[f32; 9]` storing data in column major order.
    /// If you require data in row major order `transpose` the matrix first.
    #[inline]
    pub fn to_cols_array(&self) -> [f32; 9] {
        let (m00, m01, m02) = self.x_axis.into();
        let (m10, m11, m12) = self.y_axis.into();
        let (m20, m21, m22) = self.z_axis.into();
        [m00, m01, m02, m10, m11, m12, m20, m21, m22]
    }

    /// Creates a 3x3 matrix from a `[[f32; 3]; 3]` stored in column major order.
    /// If your data is in row major order you will need to `transpose` the
    /// returned matrix.
    #[inline]
    pub fn from_cols_array_2d(m: &[[f32; 3]; 3]) -> Self {
        Self {
            x_axis: m[0].into(),
            y_axis: m[1].into(),
            z_axis: m[2].into(),
        }
    }

    /// Creates a `[[f32; 3]; 3]` storing data in column major order.
    /// If you require data in row major order `transpose` the matrix first.
    #[inline]
    pub fn to_cols_array_2d(&self) -> [[f32; 3]; 3] {
        [self.x_axis.into(), self.y_axis.into(), self.z_axis.into()]
    }

    /// Creates a 3x3 non-uniform scale matrix.
    #[inline]
    pub fn from_scale(scale: V


 )
    }

    @Test
    @Tag(WarningNames.TOO_MANY_CONSECUTIVE_SPACES)
    fun `eol comment check`() {
        lintMethod(
            """
                    |class SomeClass{              // this is a comment
                    |   val a = 5 // this is another comment
                    |}
            """.trimMargin()
        )
    }
}
package com.saveourtool.diktat.ruleset.chapter3

import com.saveourtool.diktat.ruleset.rules.chapter3.ClassLikeStructuresOrderRule
import com.saveourtool.diktat.util.FixTestBase

import generated.WarningNames
import org.junit.jupiter.api.Tag
import org.junit.jupiter.api.Tags
import org.junit.jupiter.api.Test

class ClassLikeStructuresOrderFixTest : FixTestBase("test/paragraph3/file_structure", ::ClassLikeStructuresOrderRule) {
    @Test
    @Tags(Tag(WarningNames.BLANK_LINE_BETWEEN_PROPERTIES), Tag(WarningNames.WRONG_ORDER_IN_CLASS_LIKE_STRUCTURES))
    fun `should fix order and newlines between properties`() {
        fixAndCompare("DeclarationsInClassOrderExpected.kt", "DeclarationsInClassOrderTest.kt")
    }

    @Test
    @Tags(Tag(WarningNames.BLANK_LINE_BETWEEN_PROPERTIES), Tag(WarningNames.WRONG_ORDER_IN_CLASS_LIKE_STRUCTURES))
    fun `should fix order and newlines with comment`() {
        fixAndCompare("OrderWithCommentExpected.kt", "OrderWithCommentTest.kt")
    }

    @Test
    @Tags(Tag(WarningNames.WRONG_ORDER_IN_CLASS_LIKE_STRUCTURES))
    fun `regression - should not remove enum members`() {
        fixAndCompare("OrderWithEnumsExpected.kt", "OrderWithEnumsTest.kt")
    }

    @Test
    @Tags(Tag(WarningNames.WRONG_ORDER_IN_CLASS_LIKE_STRUCTURES))
    fun `regression - should not move loggers that depend on other variables from scope`() {
        fixAndCompare("LoggerOrderExpected.kt", "LoggerOrderTest.kt")
    }

    @Test
    @Tag(WarningNames.BLANK_LINE_BETWEEN_PROPERTIES)
    fun `should add new line before the comment`() {
        fixAndCompare("CompanionObjectWithCommentExpected.kt", "CompanionObjectWithCommentTest.kt")
    }
}
package com.saveourtool.diktat.ruleset.chapter3

import com.saveourtool.diktat.common.config.rules.RulesConfig
import com.saveourtool.diktat.ruleset.constants.Warnings
import com.saveourtool.diktat.ruleset.rules.chapter3.ConsecutiveSpacesRule
import com.saveourtool.diktat.util.FixTestBase

import generated.WarningNames
import org.junit.jupiter.api.Tag
import org.junit.jupiter.api.Test

class ConsecutiveSpacesRuleFixTest : FixTestBase("test/paragraph3/spaces",
    ::ConsecutiveSpacesRule,
    listOf(
        RulesConfig(Warnings.TOO_MANY_CONSECUTIVE_SPACES.name, true,
            mapOf(
                "maxSpaces" to "1",
                "saveInitialFormattingForEnums" to "true"
            )
        )
    )
) {
    @Test
    @Tag(WarningNames.TOO_MANY_CONSECUTIVE_SPACES)
    fun `many spaces rule enum case`() {
        fixAndCompare("TooManySpacesEnumExpected.kt", "TooManySpacesEnumTest.kt")
    }

    @Test
    @Tag(WarningNames.TOO_MANY_CONSECUTIVE_SPACES)
    fun `many spaces rule`() {
        fixAndCompare("TooManySpacesExpected.kt", "TooManySpacesTest.kt")
    }
}
package com.saveourtool.diktat.ruleset.chapter3

import com.saveourtool.diktat.common.config.


(referenceDisplayName).matches("\\[instance @\\d* of shark\\.OpenJdkInstanceRefReadersTest\\\$SomeKey]")
    }
  }

  @Test fun `WeakHashMap expanded with string key`() {
    val map = WeakHashMap<Any, Any>()
    leakRoot = map
    val retainedKey = "StringKey"
    map[retainedKey] = Retained()

    System.gc()

    val refPath = findLeak(OpenJdkInstanceRefReaders.WEAK_HASH_MAP)

    assertThat(refPath).hasSize(1)

    with(refPath.first()) {
      assertThat(referenceDisplayName).isEqualTo("[\"StringKey\"]")
    }
  }

  @Test fun `WeakHashMap expanded with null key`() {
    val map = WeakHashMap<Any, Any>()
    leakRoot = map
    map[null] = Retained()

    System.gc()

    val refPath = findLeak(OpenJdkInstanceRefReaders.WEAK_HASH_MAP)

    assertThat(refPath).hasSize(1)

    with(refPath.first()) {
      assertThat(referenceDisplayName).isEqualTo("[null]")
    }
  }

  @Test fun `HashSet expanded`() {
    val set = HashSet<Any>()
    set += Retained()
    leakRoot = set

    val refPath = findLeak(OpenJdkInstanceRefReaders.HASH_SET)

    assertThat(refPath).hasSize(1)

    with(refPath.first()) {
      assertThat(owningClassName).isEqualTo(HashSet::class.qualifiedName)
      assertThat(referenceDisplayName).isEqualTo("[element()]")
    }
  }

  @Test fun `LinkedHashSet expanded`() {
    val set = LinkedHashSet<Any>()
    set += Retained()
    leakRoot = set

    val refPath = findLeak(OpenJdkInstanceRefReaders.HASH_SET)

    assertThat(refPath).hasSize(1)

    with(refPath.first()) {
      assertThat(owningClassName).isEqualTo(LinkedHashSet::class.qualifiedName)
      assertThat(referenceDisplayName).isEqualTo("[element()]")
    }
  }

  @Test fun `HashSet no expander`() {
    val set = HashSet<Any>()
    set += Retained()
    leakRoot = set

    val refPath = findLeak(NO_EXPANDER)

    assertThat(refPath).hasSize(4)

    with(refPath[0]) {
      assertThat(owningClassName).isEqualTo(HashSet::class.qualifiedName)
      assertThat(referenceDisplayName).isEqualTo("map")
    }
    with(refPath[1]) {
      assertThat(owningClassName).isEqualTo(HashMap::class.qualifiedName)
      assertThat(referenceDisplayName).isEqualTo("table")
    }
    with(refPath[2]) {
      assertThat(owningClassName).isEqualTo("java.util.HashMap\$Node[]")
      assertThat(referenceDisplayName).isEqualTo("[0]")
    }
    with(refPath[3]) {
      assertThat(owningClassName).isEqualTo("java.util.HashMap\$Node")
      assertThat(referenceDisplayName).isEqualTo("key")
    }
  }

  private fun findLeak(expanderFactory: OptionalFactory): List<LeakTraceReference> {
    val hprofFile = dumpHeap()
    return hprofFile.findPathFromLeak(computeRetainedHeapSize = false, expanderFactory)
  }

  private fun File.findPathFromLeak(
    computeRetainedHeapSize: Boolean,
    virtualRefReaderFactory: OptionalFactory,
  ): List<LeakTraceReference> {
    val leaks = openHeapGraph().use { graph ->
      val referenceMatchers = JdkReferenceMatchers.defaults

      val virtualRefReaders = virtualRefReaderFactory.create(graph)?.let {
        listOf(it)
      } ?:


 = args[1];
    if(searchText == null || searchText == 'undefined') return json;
    if(jsonKey    == null || jsonKey    == 'undefined') return json;
    // console.log('***',json, args[0]);
    // return this.allBrokers;
    var returnObjects = json;
    json.forEach( function ( filterObjectEntery ) {

      if( filterObjectEntery.hasOwnProperty( jsonKey ) ) {
        // console.log('Search key is available in JSON object.');

        if ( typeof filterObjectEntery[jsonKey] != "undefined" &&
        filterObjectEntery[jsonKey].toLowerCase().indexOf(searchText.toLowerCase()) > -1 ) {
          // console.log(',,', filterObjectEntery[jsonKey].toLowerCase())
            // object value contains the user provided text.
        } else {
            // object didn't match a filter value so remove it from array via filter
            returnObjects = returnObjects.filter(obj => obj !== filterObjectEntery);
        }
      } else {
        // console.log('Search key is not available in JSON object.');
      }

    })
    return returnObjects;
  }

  getAllBrokers(){
    this.dataService.getAllBrokers().subscribe(data=>{
      // this.leadsToday = data;
      this.allBrokers = data;
      this.allBrokers = this.allBrokers[0].allBrokers
  })

  }

}
import { filterOpenPeriods } from '../datetime';

const mockPeriods = [
  { close: { day: 0, time: '2230' }, open: { day: 0, time: '1000' } },
  { close: { day: 1, time: '2300' }, open: { day: 1, time: '1100' } },
  { close: { day: 2, time: '2300' }, open: { day: 2, time: '1100' } },
  { close: { day: 3, time: '2300' }, open: { day: 3, time: '1100' } },
  { close: { day: 4, time: '2300' }, open: { day: 4, time: '1100' } },
  { close: { day: 5, time: '2300' }, open: { day: 5, time: '1100' } },
  { close: { day: 0, time: '0300' }, open: { day: 6, time: '1000' } },
];

describe('filterOpenPeriods', () => {
  it('should return all periods when no date', () => {
    const periods = filterOpenPeriods(mockPeriods, undefined);
    expect(periods).toHaveLength(7);
  });

  it('returns a day times in the correct format', () => {
    const periods = filterOpenPeriods(mockPeriods, undefined);
    expect(periods[0]).toMatchObject({
      open: { day: 7, time: '1000' },
      close: { day: 7, time: '2230' },
    });
    expect(periods[5]).toMatchObject({
      close: { day: 5, time: '2300' },
      open: { day: 5, time: '1100' },
    });
  });

  it('returns the correct opentime on a saturday', async () => {
    const periods = filterOpenPeriods(mockPeriods, '2020-01-11T20:47:41+01:00');
    expect(periods).toHaveLength(1);
    expect(periods[0]).toMatchObject({
      open: { day: 6, time: '1000' },
      close: { day: 7, time: '0300' },
    });
  });

  it('returns the correct opentime on a saturday night/sunday morning', async () => {
    const periods = filterOpenPeriods(mockPeriods, '2020-01-12T00:44:41+00:00');
    expect(periods[0]).toMatchObject({
      open: { day: 6, time: '1000' },
      close: { day: 7, time: '0300' },
    });
  });
});
import * as mongoose from "mongoose";
import { Document, Schema } from "mongoose";
import { Observable } from "rx


import torch

from . import bev_pool_ext

class QuickBevPoolingCuda(torch.autograd.Function):
    @staticmethod
    def forward(ctx, feats, coords, ranks, B, D, H, W, pooling_method):
        """
        Args:
            ctx:
            feats: (N, C)
            coords: (N, 4)   4: (x_id, y_id, z_id, batch_id)
            ranks:  (N, )  eg: (0, 0, 1, 1, 1, 2, 2)
            B:
            D:
            H:
            W:
        Returns:
            out: (B, D, H, W, C)
        """
        kept = torch.ones(feats.shape[0], device=feats.device, dtype=torch.bool)    # (N, )
        kept[1:] = ranks[1:] != ranks[:-1]      # 边界点=1, 其余为0（pillar id发生变化）    eg:(1, 0, 1, 0, 0, 1, 0)
        interval_starts = torch.where(kept)[0].int()    # 该pillar的起始位置  (N_pillar, )    eg: (0, 2, 5)
        interval_lengths = torch.zeros_like(interval_starts)    # pillar包含points的数量  (N_pillar, )  eg: (0, 0, 0)
        interval_lengths[:-1] = interval_starts[1:] - interval_starts[:-1]   # eg: (0, 2, 5)
        interval_lengths[-1] = feats.shape[0] - interval_starts[-1]     # eg: (0, 3, 2)
        coords = coords.int()

        if pooling_method == 'sum':
            out = bev_pool_ext.bev_sum_pool_forward(
                feats,      # (N, C)
                coords,     # (N, 4)   4: (x_id, y_id, z_id, batch_id)
                interval_lengths,   # (N_pillar, )
                interval_starts,    # (N_pillar, )
                B,
                D,
                H,
                W,
            )
        elif pooling_method == 'max':
            out = bev_pool_ext.bev_max_pool_forward(
                feats,      # (N, C)
                coords,     # (N, 4)   4: (x_id, y_id, z_id, batch_id)
                interval_lengths,   # (N_pillar, )
                interval_starts,    # (N_pillar, )
                B,
                D,
                H,
                W,
            )

        ctx.save_for_backward(interval_starts, interval_lengths, coords)
        ctx.saved_shapes = B, D, H, W
        ctx.pooling_method = pooling_method
        return out

    @staticmethod
    def backward(ctx, out_grad):
        """
        Args:
            ctx:
            out_grad: (B, D, H, W, C)

        Returns:
            x_grad: (N, C)
        """
        # (N_pillar, ),  (N_pillar, ),  (N, 4)   4: (x_id, y_id, z_id, batch_id)
        interval_starts, interval_lengths, geom_coords = ctx.saved_tensors
        B, D, H, W = ctx.saved_shapes
        pooling_method = ctx.pooling_method

        out_grad = out_grad.contiguous()
        if pooling_method == 'sum':
            x_grad = bev_pool_ext.bev_sum_pool_backward(
                out_grad,               # (B, D, H, W, C)
                geom_coords,            # (N, 4)   4: (x_id, y_id, z_id, batch_id)
                interval_lengths,       # (N_pillar, )
                interval_starts,        # (N_pillar, )
                B,
                D,
                H,
                W,
            )   # (N, C)
        elif pooling_method == 'max':
            x_grad = bev_pool_ext.bev_max_pool_backward(
                out_grad,               # (B, D, H, W, C)
                geom_coords,            # (N, 4)   4: (x_id, y_id, z_id, batch_id)
                interval_lengths,       # (N_pillar, )
                interval_starts,        # (N_pillar, )
                B,
                D,
                H,
                W,
            )   # (N, C)

        return x_grad, None, None, None, None, None, None, None

def bev_pool(feats, coords, B, D, H, W, pooling_method='sum'):
    """
    Args:
        feats: (N, C)
        coords: (N, 4)  4: (x_id, y_id, z_id, batch_id)
        B:
        D:  Dz
        H:  Dy
        W:  Dx
    Returns:
        bev_features: (B, C, D, H, W)
    """
    assert feats.shape[0] == coords.shape[0]

    ranks = (
        coords[:, 0] * (H * D * B)
        + coords[:, 1] * (D * B)
        + coords[:, 2] * B
        + coords[:, 3]
    )       # (N, )
    indices = ranks.argsort()   # (N, )
    # (N, C), (N, 4), (N, )
    feats, coords, ranks = feats[indices], coords[indices], ranks[indices]

    x = QuickBevPoolingCuda.apply(feats, coords, ranks, B, D, H, W, pooling_method)     # (B, D, H, W, C)
    x = x.permute(0, 4, 1, 2, 3).contiguous()   # (B, C, D, H, W)
    return x