matrix */

/*        MOUT = | -3.0D0   5.0D0  7.0D0 | */
/*               |                       | */
/*               | -3.0D0   7.0D0  8.0D0 | */
/*               |                       | */
/*               | -3.0D0   9.0D0  9.0D0 | */

/* $ Restrictions */

/*      The user is responsible for checking the magnitudes of the */
/*      elements of M1 and M2 so that a floating point overflow does */
/*      not occur.  (In the typical use where M1 and M2 are rotation */
/*      matrices, this not a risk at all.) */

/* $ Exceptions */

/*     Error free. */

/* $ Files */

/*      None */

/* $ Author_and_Institution */

/*      W.M. Owen       (JPL) */

/* $ Literature_References */

/*      None. */

/* $ Version */

/* -    SPICELIB Version 1.0.1, 10-MAR-1992 (WLT) */

/*        Comment section for permuted index source lines was added */
/*        following the header. */

/* -    SPICELIB Version 1.0.0, 31-JAN-1990 (WMO) */

/* -& */
/* $ Index_Entries */

/*     matrix_transpose times matrix 3x3_case */

/* -& */

/*  Perform the matrix multiplication */

    for (i__ = 1; i__ <= 3; ++i__) {
	for (j = 1; j <= 3; ++j) {
	    prodm[(i__1 = i__ + j * 3 - 4) < 9 && 0 <= i__1 ? i__1 : s_rnge(
		    "prodm", i__1, "mtxm_", (ftnlen)170)] = m1[(i__2 = i__ *
		    3 - 3) < 9 && 0 <= i__2 ? i__2 : s_rnge("m1", i__2, "mtx"
		    "m_", (ftnlen)170)] * m2[(i__3 = j * 3 - 3) < 9 && 0 <=
		    i__3 ? i__3 : s_rnge("m2", i__3, "mtxm_", (ftnlen)170)] +
		    m1[(i__4 = i__ * 3 - 2) < 9 && 0 <= i__4 ? i__4 : s_rnge(
		    "m1", i__4, "mtxm_", (ftnlen)170)] * m2[(i__5 = j * 3 - 2)
		     < 9 && 0 <= i__5 ? i__5 : s_rnge("m2", i__5, "mtxm_", (
		    ftnlen)170)] + m1[(i__6 = i__ * 3 - 1) < 9 && 0 <= i__6 ?
		    i__6 : s_rnge("m1", i__6, "mtxm_", (ftnlen)170)] * m2[(
		    i__7 = j * 3 - 1) < 9 && 0 <= i__7 ? i__7 : s_rnge("m2",
		    i__7, "mtxm_", (ftnlen)170)];
	}
    }

/*  Move the result into MOUT */

    moved_(prodm, &c__9, mout);

    return 0;
} /* mtxm_ */


            if (primitive_info == (PrimitiveInfo *) NULL)
              {
                (void) ThrowMagickException(exception,GetMagickModule(),
                  ResourceLimitError,"MemoryAllocationFailed","`%s'",
                  image->filename);
                break;
              }
          }
        (void) WriteBlobString(image,"  <path d=\"");
        (void) WriteBlobString(image,token);
        (void) WriteBlobString(image,"\"/>\n");
        break;
      }
      case AlphaPrimitive:
      case ColorPrimitive:
      {
        if (primitive_info[j].coordinates != 1)
          {
            status=MagickFalse;
            break;
          }
        (void) GetNextToken(q,&q,extent,token);
        if (LocaleCompare("point",token) == 0)
          primitive_info[j].method=PointMethod;
        if (LocaleCompare("replace",token) == 0)
          primitive_info[j].method=ReplaceMethod;
        if (LocaleCompare("floodfill",token) == 0)
          primitive_info[j].method=FloodfillMethod;
        if (LocaleCompare("filltoborder",token) == 0)
          primitive_info[j].method=FillToBorderMethod;
        if (LocaleCompare("reset",token) == 0)
          primitive_info[j].method=ResetMethod;
        break;
      }
      case TextPrimitive:
      {
        if (primitive_info[j].coordinates != 1)
          {
            status=MagickFalse;
            break;
          }
        (void) GetNextToken(q,&q,extent,token);
        (void) FormatLocaleString(message,MagickPathExtent,
          "  <text x=\"%g\" y=\"%g\">",primitive_info[j].point.x,
          primitive_info[j].point.y);
        (void) WriteBlobString(image,message);
        for (p=(const char *) token; *p != '\0'; p++)
          switch (*p)
          {
            case '<': (void) WriteBlobString(image,"<"); break;
            case '>': (void) WriteBlobString(image,">"); break;
            case '&': (void) WriteBlobString(image,"&"); break;
            default: (void) WriteBlobByte(image,(unsigned char) *p); break;
          }
        (void) WriteBlobString(image,"</text>\n");
        break;
      }
      case ImagePrimitive:
      {
        if (primitive_info[j].coordinates != 2)
          {
            status=MagickFalse;
            break;
          }
        (void) GetNextToken(q,&q,extent,token);
        (void) FormatLocaleString(message,MagickPathExtent,
          "  <image x=\"%g\" y=\"%g\" width=\"%g\" height=\"%g\" "
          "href=\"%s\"/>\n",primitive_info[j].point.x,
          primitive_info[j].point.y,primitive_info[j+1].point.x,
          primitive_info[j+1].point.y,token);
        (void) WriteBlobString(image,message);
        break;
      }
    }
    if (primitive_info == (PrimitiveInfo *) NULL)
      break;
    primitive_info[i].primitive=UndefinedPrimitive;
    if (status == MagickFalse)
      break;
  }
  (void) WriteBlobString(image,"</svg>\n");
  /*
    Relinquish resources.
  */
  token=DestroyString(token);
  if (primitive_info != (PrimitiveInfo *) NULL)
    primitive_info=(PrimitiveInfo *) RelinquishMagickMemory(primitive_info);
  if (CloseBlob(image) == MagickFalse)
    status=MagickFalse;
  return(status);
}


         HavokQSTransform* addr = (HavokQSTransform*) Data;
            _translation = addr->_translate;
            _quaternion = addr->_quaternion;
            _scale = addr->_scale;
            return false;
        }

        public override void OnRebuild(VoidPtr address, int length, bool force)
        {
            HavokQSTransform* addr = (HavokQSTransform*) address;
            addr->_translate = _translation;
            addr->_quaternion = _quaternion;
            addr->_scale = _scale;
        }

        public override void WriteParams(System.Xml.XmlWriter writer, Dictionary<HavokClassNode, int> classNodes)
        {
            writer.WriteString(
                $"({_translation._x.ToString("0.000000", CultureInfo.InvariantCulture)} {_translation._y.ToString("0.000000", CultureInfo.InvariantCulture)} {_translation._z.ToString("0.000000", CultureInfo.InvariantCulture)})({_quaternion._x.ToString("0.000000", CultureInfo.InvariantCulture)} {_quaternion._y.ToString("0.000000", CultureInfo.InvariantCulture)} {_quaternion._z.ToString("0.000000", CultureInfo.InvariantCulture)} {_quaternion._w.ToString("0.000000", CultureInfo.InvariantCulture)})({_scale._x.ToString("0.000000", CultureInfo.InvariantCulture)} {_scale._y.ToString("0.000000", CultureInfo.InvariantCulture)} {_scale._z.ToString("0.000000", CultureInfo.InvariantCulture)})");
        }
    }
}


toc_Agent-Expressions" href="Agent-Expressions.html#Agent-Expressions">Appendix F The GDB Agent Expression Mechanism

F.1 General Bytecode Design

F.2 Bytecode Descriptions

F.3 Using Agent Expressions

F.4 Varying Target Capabilities

F.5 Rationale

Appendix G Target Descriptions

G.1 Retrieving Descriptions

G.2 Target Description Format

G.2.1 Inclusion

G.2.2 Architecture

G.2.3 OS ABI

G.2.4 Compatible Architecture

G.2.5 Features

G.2.6 Types

G.2.7 Registers

G.3 Predefined Target Types

G.4 Standard Target Features

G.4.1 AArch64 Features

G.4.2 ARM Features

G.4.3 i386 Features

G.4.4 MicroBlaze Features

G.4.5 <acronym>MIPS</acronym> Features

G.4.6 M68K Features

G.4.7 Nios II Features

G.4.8 PowerPC Features

G.4.9 S/390 and System z Features

G.4.10 TMS320C6x Features

Appendix H Operating System Information

H.1 Process list

<a name="toc_Trace-File-Format" href="Trace-File-Format.htm


			fileName = filepath.Base(perSeg.Path())
		} else {
			// segment is not persisted
			// the name of the segment file that is generated if the
			// the segment is persisted in the future.
			fileName = zapFileName(seg.id)
		}
		if is.parent.copyScheduled[fileName]--; is.parent.copyScheduled[fileName] <= 0 {
			delete(is.parent.copyScheduled, fileName)
		}
	}
	is.parent.rootLock.Unlock()
	// close the index snapshot normally
	return is.Close()
}

func (is *IndexSnapshot) ThesaurusTermReader(ctx context.Context, thesaurusName string, term []byte) (index.ThesaurusTermReader, error) {
	rv := &IndexSnapshotThesaurusTermReader{
		name:          thesaurusName,
		snapshot:      is,
		postings:      make([]segment.SynonymsList, len(is.segment)),
		iterators:     make([]segment.SynonymsIterator, len(is.segment)),
		thesauri:      make([]segment.Thesaurus, len(is.segment)),
		segmentOffset: 0,
	}

	for i, s := range is.segment {
		if synSeg, ok := s.segment.(segment.ThesaurusSegment); ok {
			thes, err := synSeg.Thesaurus(thesaurusName)
			if err != nil {
				return nil, err
			}
			rv.thesauri[i] = thes
			pl, err := rv.thesauri[i].SynonymsList(term, s.deleted, rv.postings[i])
			if err != nil {
				return nil, err
			}
			rv.postings[i] = pl

			rv.iterators[i] = pl.Iterator(rv.iterators[i])
		}
	}
	return rv, nil
}

func (is *IndexSnapshot) newIndexSnapshotThesaurusKeys(name string,
	makeItr func(i segment.Thesaurus) segment.ThesaurusIterator,
) (*IndexSnapshotThesaurusKeys, error) {
	results := make(chan *asynchSegmentResult, len(is.segment))
	var wg sync.WaitGroup
	wg.Add(len(is.segment))
	for _, s := range is.segment {
		go func(s *SegmentSnapshot) {
			defer wg.Done()
			if synSeg, ok := s.segment.(segment.ThesaurusSegment); ok {
				thes, err := synSeg.Thesaurus(name)
				if err != nil {
					results <- &asynchSegmentResult{err: err}
				} else {
					results <- &asynchSegmentResult{thesItr: makeItr(thes)}
				}
			}
		}(s)
	}
	// Close the channel after all goroutines complete
	go func() {
		wg.Wait()
		close(results)
	}()

	var err error
	rv := &IndexSnapshotThesaurusKeys{
		snapshot: is,
		cursors:  make([]*segmentThesCursor, 0, len(is.segment)),
	}
	for asr := range results {
		if asr.err != nil && err == nil {
			err = asr.err
		} else {
			next, err2 := asr.thesItr.Next()
			if err2 != nil && err == nil {
				err = err2
			}
			if next != nil {
				rv.cursors = append(rv.cursors, &segmentThesCursor{
					itr:  asr.thesItr,
					curr: *next,
				})
			}
		}
	}
	// after ensuring we've read all items on channel
	if err != nil {
		return nil, err
	}

	return rv, nil
}

func (is *IndexSnapshot) ThesaurusKeys(name string) (index.ThesaurusKeys, error) {
	return is.newIndexSnapshotThesaurusKeys(name, func(is segment.Thesaurus) segment.ThesaurusIterator {


required_styles - set(style_definitions.keys())
        if missing_styles:
            logging.error(f"סגנונות חסרים בקובץ העיצובים: {', '.join(missing_styles)}. ודא שכל הסגנונות הדרושים מוגדרים.")
            sys.exit(1)

        image_creator = ImageCreator(styles=style_definitions)
        audio_creator = AudioCreator(file_manager.temp_dir)
        video_assembler = VideoAssemblerShorts(file_manager, image_creator, audio_creator, style_definitions)

        video_assembler.assemble_shorts_videos(data, OUTPUT_DIR, THUMBNAILS_DIR)

        logging.info("יצירת כל הסרטונים הסתיימה!")

    except FileNotFoundError as e:
        logging.error(f"לא ניתן למצוא קובץ: {e.filename}")
    except json.JSONDecodeError as e:
        logging.error(f"שגיאה בפענוח קובץ JSON: {e}")
    except Exception as e:
        logging.error(f"שגיאה כללית בתהליך יצירת הסרטונים: {e}")
    finally:
        if file_manager:
            file_manager.cleanup()
        # סגירת ThreadPoolExecutor של האודיו
        if 'audio_creator' in locals() and audio_creator:
            audio_creator.shutdown()

if __name__ == "__main__":
    main()


		fmt.Errorf("Job task group %s has count %d. Count cannot exceed 1 with system scheduler",
					tg.Name, tg.Count))
		}
	}

	// Validate the task group
	for _, tg := range j.TaskGroups {
		if err := tg.Validate(j); err != nil {
			outer := fmt.Errorf("Task group %s validation failed: %v", tg.Name, err)
			mErr.Errors = append(mErr.Errors, outer)
		}
	}

	// Validate periodic is only used with batch or sysbatch jobs.
	if j.IsPeriodic() && j.Periodic.Enabled {
		if j.Type != JobTypeBatch && j.Type != JobTypeSysBatch {
			mErr.Errors = append(mErr.Errors, fmt.Errorf(
				"Periodic can only be used with %q or %q scheduler", JobTypeBatch, JobTypeSysBatch,
			))
		}

		if err := j.Periodic.Validate(); err != nil {
			mErr.Errors = append(mErr.Errors, err)
		}
	}

	if j.IsParameterized() {
		if j.Type != JobTypeBatch && j.Type != JobTypeSysBatch {
			mErr.Errors = append(mErr.Errors, fmt.Errorf(
				"Parameterized job can only be used with %q or %q scheduler", JobTypeBatch, JobTypeSysBatch,
			))
		}

		if err := j.ParameterizedJob.Validate(); err != nil {
			mErr.Errors = append(mErr.Errors, err)
		}
	}

	if j.IsMultiregion() {
		if err := j.Multiregion.Validate(j.Type, j.Datacenters); err != nil {
			mErr.Errors = append(mErr.Errors, err)
		}
	}

	return mErr.ErrorOrNil()
}

// Warnings returns a list of warnings that may be from dubious settings or
// deprecation warnings.
func (j *Job) Warnings() error {
	var mErr multierror.Error

	// Check the groups
	hasAutoPromote, allAutoPromote := false, true

	for _, tg := range j.TaskGroups {
		if err := tg.Warnings(j); err != nil {
			outer := fmt.Errorf("Group %q has warnings: %v", tg.Name, err)
			mErr.Errors = append(mErr.Errors, outer)
		}

		if u := tg.Update; u != nil {
			hasAutoPromote = hasAutoPromote || u.AutoPromote

			// Having no canaries implies auto-promotion since there are no canaries to promote.
			allAutoPromote = allAutoPromote && (u.Canary == 0 || u.AutoPromote)
		}
	}

	// Check AutoPromote, should be all or none
	if hasAutoPromote && !allAutoPromote {
		err := fmt.Errorf("auto_promote must be true for all groups to enable automatic promotion")
		mErr.Errors = append(mErr.Errors, err)
	}

	// cron -> crons
	if j.Periodic != nil && j.Periodic.Spec != "" {
		err := fmt.Errorf("cron is deprecated and may be removed in a future release. Use crons instead")
		mErr.Errors = append(mErr.Errors, err)
	}

	return mErr.ErrorOrNil()
}

// LookupTaskGroup finds a task group by name
func (j *Job) LookupTaskGroup(name string) *TaskGroup {
	if j == nil {
		return nil
	}
	for _, tg := range j.TaskGroups {
		if tg.Name == name {
			return tg
		}
	}
	return nil
}

// CombinedTaskMeta takes a TaskGroup and Task name and returns the combined
// meta data for the task. When joining Job, Group and Task Meta, the precedence
// is by deepest scope (Task > Group > Job).
func (j *Job) CombinedTaskMeta(groupName, taskName string


package us.ihmc.exampleSimulations.springBall;

import us.ihmc.simulationconstructionset.util.RobotController;
import us.ihmc.yoVariables.registry.YoRegistry;
import us.ihmc.yoVariables.variable.YoDouble;

public class SpringBallController implements RobotController
{
   private SpringBallRobot rob;

   private YoDouble t, q_x, q_y, q_z;
   private YoDouble qd_wx, qd_wy, qd_wz;

   private YoDouble[]
      pos = new YoDouble[SpringBallRobot.NUM_SPIKES], vel = new YoDouble[SpringBallRobot.NUM_SPIKES], tau = new YoDouble[SpringBallRobot.NUM_SPIKES];

   private YoRegistry registry = new YoRegistry("SpringBallController");

   private YoDouble offset_spike = new YoDouble("offset_spike", registry), amp_spike = new YoDouble("amp_spike", registry),
                      freq_spike = new YoDouble("freq_spike", registry);
   private YoDouble q_d_spike = new YoDouble("q_d_spike", registry), k_spike = new YoDouble("k_spike", registry),
                      b_spike = new YoDouble("b_spike", registry);

   private YoDouble[] controlVars = new YoDouble[]
   {
      offset_spike, amp_spike, freq_spike, q_d_spike, k_spike, b_spike
   };

   private String name;

   public SpringBallController(SpringBallRobot rob, String name)
   {
      this.name = name;
      this.rob = rob;
      initControl();
   }

   private void initControl()
   {
      t = (YoDouble)rob.findVariable("t");

      q_x = (YoDouble)rob.findVariable("q_x");
      q_y = (YoDouble)rob.findVariable("q_y");
      q_z = (YoDouble)rob.findVariable("q_z");

      qd_wx = (YoDouble)rob.findVariable("qd_wx");
      qd_wy = (YoDouble)rob.findVariable("qd_wy");
      qd_wz = (YoDouble)rob.findVariable("qd_wz");

      q_z.set(1.0);

      for (int i = 0; i < SpringBallRobot.NUM_SPIKES; i++)
      {
         pos[i] = (YoDouble)rob.findVariable("q_slider" + i);
         vel[i] = (YoDouble)rob.findVariable("qd_slider" + i);
         tau[i] = (YoDouble)rob.findVariable("tau_slider" + i);
      }

      q_d_spike.set(0.0);
      k_spike.set(100.0);
      b_spike.set(2.0);

      offset_spike.set(-0.1);
      amp_spike.set(0.1);
      freq_spike.set(1.0);

      qd_wz.set(2.0);
      qd_wy.set(1.0);
      qd_wx.set(-1.5);
   }

   public YoDouble[] getControlVars()
   {
      return controlVars;
   }

   public void doControl()
   {
      q_d_spike.set(offset_spike.getDoubleValue() + amp_spike.getDoubleValue() * Math.cos(2.0 * Math.PI * freq_spike.getDoubleValue() * t.getDoubleValue()));

      for (int i = 0; i < SpringBallRobot.NUM_SPIKES; i++)
      {
         tau[i].set(k_spike.getDoubleValue() * (q_d_spike.getDoubleValue() - pos[i].getDoubleValue()) - b_spike.getDoubleValue() * vel[i].getDoubleValue());
      }

   }

   public YoRegistry getYoRegistry()
   {
      return registry;
   }

   public String getName()
   {
      return name;
   }

   public void initialize()
   {
   }

   public String getDescription()
   {
      return getName();
   }
}
pa


r ();
  int64_t delta = meas - m_estimatedRtt.GetInteger ();
  int64_t srtt = (m_estimatedRtt.GetInteger () << rttShift) + delta;
  m_estimatedRtt = Time::From (srtt >> rttShift);
  if (delta < 0)
    {
      delta = -delta;
    }
  delta -= m_estimatedVariation.GetInteger ();
  int64_t rttvar = m_estimatedVariation.GetInteger () << variationShift;
  rttvar += delta;
  m_estimatedVariation = Time::From (rttvar >> variationShift);
  return;
}

void
RttMeanDeviation::Measurement (Time m)
{
  NS_LOG_FUNCTION (this << m);
  if (m_nSamples)
    {
      // If both alpha and beta are reciprocal powers of two, updating can
      // be done with integer arithmetic according to Jacobson/Karels paper.
      // If not, since class Time only supports integer multiplication,
      // must convert Time to floating point and back again
      uint32_t rttShift = CheckForReciprocalPowerOfTwo (m_alpha);
      uint32_t variationShift = CheckForReciprocalPowerOfTwo (m_beta);
      if (rttShift && variationShift)
        {
          IntegerUpdate (m, rttShift, variationShift);
        }
      else
        {
          FloatingPointUpdate (m);
        }
    }
  else
    { // First sample
      m_estimatedRtt = m;               // Set estimate to current
      m_estimatedVariation = m / 2;  // And variation to current / 2
      NS_LOG_DEBUG ("(first sample) m_estimatedVariation += " << m);
    }
  m_nSamples++;
}

Ptr<RttEstimator>
RttMeanDeviation::Copy () const
{
  NS_LOG_FUNCTION (this);
  return CopyObject<RttMeanDeviation> (this);
}

void
RttMeanDeviation::Reset ()
{
  NS_LOG_FUNCTION (this);
  RttEstimator::Reset ();
}

} //namespace ns3
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
 * Copyright (c) 2008 INRIA
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation;
 *
 * 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
 *
 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
 */
#include "ipv4-list-routing-helper.h"
#include "ns3/ipv4-list-routing.h"
#include "ns3/node.h"

namespace ns3 {

Ipv4ListRoutingHelper::Ipv4ListRoutingHelper()
{
}

Ipv4ListRoutingHelper::~Ipv4ListRoutingHelper()
{
  for (std::list<std::pair<const Ipv4RoutingHelper *, int16_t> >::iterator i = m_list.begin ();
       i != m_list.end (); ++i)
    {
      delete i->first;
    }
}

Ipv4ListRoutingHelper::Ipv4ListRoutingHelper (const Ipv4ListRoutingHelper &o)
{
  std::list<std::pair<const Ipv4RoutingHelper *, int16_


_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
           const linear_congruential_engine<_UIntType, __a, __c, __m>& __x)
{
    __save_flags<_CharT, _Traits> __lx(__os);
    typedef basic_ostream<_CharT, _Traits> _Ostream;
    __os.flags(_Ostream::dec | _Ostream::left);
    __os.fill(__os.widen(' '));
    return __os << __x.__x_;
}

template <class _CharT, class _Traits,
          class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
           linear_congruential_engine<_UIntType, __a, __c, __m>& __x)
{
    __save_flags<_CharT, _Traits> __lx(__is);
    typedef basic_istream<_CharT, _Traits> _Istream;
    __is.flags(_Istream::dec | _Istream::skipws);
    _UIntType __t;
    __is >> __t;
    if (!__is.fail())
        __x.__x_ = __t;
    return __is;
}

typedef linear_congruential_engine<uint_fast32_t, 16807, 0, 2147483647>
                                                                   minstd_rand0;
typedef linear_congruential_engine<uint_fast32_t, 48271, 0, 2147483647>
                                                                    minstd_rand;

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___RANDOM_LINEAR_CONGRUENTIAL_ENGINE_H


(0x3f),
  shared_type(0x40),
  type_unit(0x41),
  rvalue_reference_type(0x42),
  template_alias(0x43),
  coarray_type(0x44),
  generic_subrange(0x45),
  dynamic_type(0x46),
  atomic_type(0x47),
  call_site(0x48),
  call_site_parameter(0x49),
  skeleton_unit(0x4a),
  immutable_type(0x4b),
  lo_user(0x4080),
  hi_user(0xffff),

  unrecognized(-1);

  final int code;
  final String? _name; // For renames due to keywords/existing members.

  const _Tag(this.code, {String? name}) : _name = name;

  static const _prefix = 'DW_TAG';

  static _Tag fromReader(Reader reader) {
    final code = reader.readLEB128EncodedInteger();
    for (final name in values) {
      if (name.code == code) {
        return name;
      }
    }
    return unrecognized;
  }

  @override
  String toString() {
    if (this == unrecognized) {
      return 'unrecognized $_prefix code';
    }
    return '${_prefix}_${_name ?? name}';
  }
}

enum _FormClass {
  // Location in the address space of the program.
  address,
  // Location in the DWARF section.
  addrptr,
  // An arbitrary number of uninterpreted bytes of data, with the length
  // either implicit by context or preceded by a length marker.
  block,
  // An (S)LEB128 encoded or specific-sized uninterpreted data value.
  constant,
  // A DWARF expression for a value or location in the program's address space
  // preceded by a length marker.
  exprloc,
  // A small constant indicating the presence or absence of an attribute.
  flag,
  // A location in the line number information DWARF section.
  lineptr,
  // A location in the location lists DWARF section.
  loclist,
  // A location in the location lists DWARF section.
  loclistsptr,
  // A location in the macro definition DWARF section.
  macptr,
  // A reference to one of the debugging information entries.
  reference,
  // A location in the non-contiguous address ranges DWARF section.
  rnglist,
  // A location in the non-contiguous address ranges DWARF section.
  rnglistsptr,
  // Either a null-terminated sequence of zero or more bytes or the offset of
  // one in a separate string table.
  string,
  // An offset into a DWARF section that itself holds offsets into a DWARF
  // string section.
  stroffsetsptr;
}

enum _AttributeName {
  // Snake case used to match DWARF specification. Skipped code values are
  // reserved entries that have been deprecated in more recent DWARF versions
  // and should not be used.
  sibling(0x01, {_FormClass.reference}),
  location(0x02, {_FormClass.exprloc, _FormClass.loclist}),
  nameValue(0x03, {_FormClass.string}, name: 'name'),
  ordering(0x09, {_FormClass.constant}),
  byte_size(
      0x0b, {_FormClass.constant, _FormClass.exprloc, _FormClass.reference}),
  // Reserved but allowed for backwards compatibility.
  bit_offset(
      0x0c, {_FormClass.constant, _FormClass.exprloc, _FormClass.reference}),


from telegram.ext import CommandHandler, MessageHandler, ConversationHandler, filters
from src.interactor.interfaces.logger.logger import LoggerInterface
from src.app.telegram_postgresql.controllers.create_user_controller import CreateUserController

NAME, LEVEL, NATIVE_LANGUAGE, TARGET_LANGUAGE, END = range(5)

def create_user_scenario(logger: LoggerInterface, teardown_request, before_request):
    controller = CreateUserController(logger, teardown_request, before_request)

    register_scenario = ConversationHandler(
        entry_points=[CommandHandler('register', controller.start)],
        states={
            NAME: [MessageHandler(filters.TEXT, controller.get_user_name)],
            LEVEL: [MessageHandler(filters.TEXT, controller.get_cerf_language_level)],
            NATIVE_LANGUAGE: [MessageHandler(filters.TEXT, controller.get_first_language)],
            TARGET_LANGUAGE: [MessageHandler(filters.TEXT, controller.get_learning_language)],
            END: [MessageHandler(filters.TEXT, controller.execute)],
        },
        fallbacks=[],
        allow_reentry=True
    )

    return register_scenario


va.lang.Override
    public int getApiembahlab() {
      return apiembahlab_;
    }

    public static final int MHKDMDJEAAN_FIELD_NUMBER = 14;
    private boolean mhkdmdjeaan_;
    /**
     * bool mhkdmdjeaan = 14;
     * @return The mhkdmdjeaan.
     */
    @java.lang.Override
    public boolean getMhkdmdjeaan() {
      return mhkdmdjeaan_;
    }

    public static final int CJEGMOMLBCK_FIELD_NUMBER = 15;
    private emu.grasscutter.net.proto.BreakoutVector2OuterClass.BreakoutVector2 cjegmomlbck_;
    /**
     * .BreakoutVector2 cjegmomlbck = 15;
     * @return Whether the cjegmomlbck field is set.
     */
    @java.lang.Override
    public boolean hasCjegmomlbck() {
      return cjegmomlbck_ != null;
    }
    /**
     * .BreakoutVector2 cjegmomlbck = 15;
     * @return The cjegmomlbck.
     */
    @java.lang.Override
    public emu.grasscutter.net.proto.BreakoutVector2OuterClass.BreakoutVector2 getCjegmomlbck() {
      return cjegmomlbck_ == null ? emu.grasscutter.net.proto.BreakoutVector2OuterClass.BreakoutVector2.getDefaultInstance() : cjegmomlbck_;
    }
    /**
     * .BreakoutVector2 cjegmomlbck = 15;
     */
    @java.lang.Override
    public emu.grasscutter.net.proto.BreakoutVector2OuterClass.BreakoutVector2OrBuilder getCjegmomlbckOrBuilder() {
      return getCjegmomlbck();
    }

    public static final int IDNGDPALICJ_FIELD_NUMBER = 16;
    private int idngdpalicj_;
    /**
     * uint32 idngdpalicj = 16;
     * @return The idngdpalicj.
     */
    @java.lang.Override
    public int getIdngdpalicj() {
      return idngdpalicj_;
    }

    public static final int OFFSET_FIELD_NUMBER = 17;
    private int offset_;
    /**
     * int32 offset = 17;
     * @return The offset.
     */
    @java.lang.Override
    public int getOffset() {
      return offset_;
    }

    public static final int LCCMDKIBDPF_FIELD_NUMBER = 18;
    private long lccmdkibdpf_;
    /**
     * uint64 lccmdkibdpf = 18;
     * @return The lccmdkibdpf.
     */
    @java.lang.Override
    public long getLccmdkibdpf() {
      return lccmdkibdpf_;
    }

    private byte memoizedIsInitialized = -1;
    @java.lang.Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (actionType_ != emu.grasscutter.net.proto.BreakoutActionTypeOuterClass.BreakoutActionType.BREAKOUT_ACTION_TYPE_NONE.getNumber()) {
        output.writeEnum(1, actionType_);
      }
      if (clientGameTime_ != 0L) {
        output.writeUInt64(2, clientGameTime_);
      }
      if (serverGameTime_ != 0L) {
        output.writeUInt64(


le throwable;

	/**
	 * Called by the game to create a new BattleErrorEvent.
	 * Please don't use this constructor as it might change.
	 *
	 * @param error the error message from the game.
	 * @param throwable instance of the error
	 */
	public BattleErrorEvent(String error,Throwable throwable) {
		super();
		this.error = error;
		this.throwable = throwable;
	}

	/**
	 * Returns the error message.
	 *
	 * @return the error message that was sent from the game during the battle.
	 */
	public String getError() {
		return error;
	}

	/**
	 * Returns the error instance when available.
	 *
	 * @return the error instance that was sent from the game during the battle. Could be null.
	 */
	public Throwable getErrorInstance() {
		return throwable;
	}
}
/*
 * Copyright (c) 2001-2025 Mathew A. Nelson and Robocode contributors
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * https://robocode.sourceforge.io/license/epl-v10.html
 */
package net.sf.robocode.host;

import net.sf.robocode.core.Container;
import net.sf.robocode.io.Logger;
import net.sf.robocode.settings.ISettingsManager;
import net.sf.robocode.ui.IWindowManager;
import net.sf.robocode.util.JavaVersion;

/**
 * @author Mathew A. Nelson (original)
 * @author Flemming N. Larsen (contributor)
 * @author Robert Maupin (contributor)
 * @author Pavel Savara (contributor)
 */
public class CpuManager implements ICpuManager { // NO_UCD (use default)

	private static final int APPROXIMATE_CYCLES_ALLOWED = 6250;
	private static final int TEST_PERIOD_MILLIS = 5000;

	private static final boolean JAVA_9_OR_NEWER = JavaVersion.getJavaMajorVersion() >= 9;

	private long cpuConstant = -1;
	private final ISettingsManager properties;

	public CpuManager(ISettingsManager properties) { // NO_UCD (unused code)
		this.properties = properties;
	}

	public long getCpuConstant() {
		if (cpuConstant == -1) {
			cpuConstant = properties.getCpuConstant();
			if (cpuConstant == -1) {
				calculateCpuConstant();
			}
		}
		return cpuConstant;
	}

	public void calculateCpuConstant() {
		setStatus("Estimating CPU speed, please wait...");

		setCpuConstant();
		Logger.logMessage(
				"Each robot will be allowed a maximum of " + cpuConstant + " nanoseconds per turn on this system.");

		properties.setCpuConstant(cpuConstant);
		properties.saveProperties();

		setStatus("");
	}

	private void setCpuConstant() {
		long count = 0;
		double d = 0;

		long start = System.currentTimeMillis();

		while (System.currentTimeMillis() - start < TEST_PERIOD_MILLIS) {
			d += Math.hypot(Math.sqrt(Math.abs(log(Math.atan(Math.random())))), Math.cbrt(Math.abs(Math.random() * 10))) / exp(Math.random());
			count++;
		}

		// to cheat optimizer, almost never happen
		if (d == 0.0) {
			Logger.logMessage("bingo!");
		}

		cpuConstant = Math.max(1, (long) (1000000.0 * APPROXIMATE_CYCLES_ALLOWED * TEST_PERIOD_MILLIS / count));
	}

	private void setStatus(String message) {
		IWindowManager windowManager = Container.getComponent(IWindowManager.class);

		if (windowManager != null) {
			windowManager.setStatus(message);
		}
	}

	// Work-around for bug #390
	// The Java 9 Math.log(x) methods is much faster than in Java 8
	private static double log(double x) {


using GraphQLParser.AST;

namespace GraphQLParser.Visitors;

/// <summary>
/// Gets the maximum depth for the specified AST node.
/// Minimum depth is 1.
/// </summary>
/// <typeparam name="TContext">Type of the context object passed into all VisitXXX methods.</typeparam>
public class MaxDepthVisitor<TContext> : ASTVisitor<TContext>
    where TContext : IMaxDepthContext
{
    /// <inheritdoc/>
    public override async ValueTask VisitAsync(ASTNode? node, TContext context)
    {
        if (node != null)
        {
            context.Parents.Push(node);

            if (context.Parents.Count > context.MaxDepth)
                context.MaxDepth = context.Parents.Count;

            await base.VisitAsync(node, context).ConfigureAwait(false);

            context.Parents.Pop();
        }
    }
}


on, this);
                string response;

                if (string.IsNullOrEmpty(Name) || UseRegex.IsPresent || Name.Contains("*") || Name.Contains("?"))
                {
                    // Get all nodes
                    response = client.Get("nodes");
                    var nodesData = JsonUtility.DeserializeResponse<JArray>(response);
                    var nodes = new List<ProxmoxNode>();

                    foreach (var nodeObj in nodesData)
                    {
                        var node = nodeObj.ToObject<ProxmoxNode>();
                        nodes.Add(node);
                    }

                    // Apply name filtering if specified
                    if (!string.IsNullOrEmpty(Name))
                    {
                        nodes = FilterByProperty(nodes, "Name", Name).ToList();
                    }

                    if (RawJson.IsPresent)
                    {
                        WriteObject(response);
                    }
                    else
                    {
                        WriteObject(nodes, true);
                    }
                }
                else
                {
                    // Get a specific node
                    response = client.Get($"nodes/{Name}/status");
                    var nodeData = JsonUtility.DeserializeResponse<JObject>(response);
                    var node = nodeData.ToObject<ProxmoxNode>();
                    node.Name = Name;

                    if (RawJson.IsPresent)
                    {
                        WriteObject(response);
                    }
                    else
                    {
                        WriteObject(node);
                    }
                }
            }
            catch (Exception ex)
            {
                WriteError(new ErrorRecord(ex, "GetProxmoxNodeError", ErrorCategory.OperationStopped, Connection));
            }
        }
    }
}


-danger-rgb: 220,53,69;--bs-light-rgb: 224,226,228;--bs-dark-rgb: 53,54,56;--bs-primary-text-emphasis: #14181e;--bs-secondary-text-emphasis: #662314;--bs-success-text-emphasis: #0a3622;--bs-info-text-emphasis: #055160;--bs-warning-text-emphasis: #664d03;--bs-danger-text-emphasis: #58151c;--bs-light-text-emphasis: #606164;--bs-dark-text-emphasis: #606164;--bs-primary-bg-subtle: #d6d8db;--bs-secondary-bg-subtle: #ffddd6;--bs-success-bg-subtle: #d1e7dd;--bs-info-bg-subtle: #cff4fc;--bs-warning-bg-subtle: #fff3cd;--bs-danger-bg-subtle: #f8d7da;--bs-light-bg-subtle: #ebedef;--bs-dark-bg-subtle: #A0A1A4;--bs-primary-border-subtle: #adb1b7;--bs-secondary-border-subtle: #ffbcad;--bs-success-border-subtle: #a3cfbb;--bs-info-border-subtle: #9eeaf9;--bs-warning-border-subtle: #ffe69c;--bs-danger-border-subtle: #f1aeb5;--bs-light-border-subtle: #CACCCF;--bs-dark-border-subtle: #8B8C8E;--bs-white-rgb: 245,247,250;--bs-black-rgb: 32,33,35;--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--bs-font-monospace: "Source Code Pro";--bs-gradient: linear-gradient(180deg, rgba(245,247,250,0.15), rgba(245,247,250,0));--bs-body-font-family: Roboto;--bs-body-font-size:1rem;--bs-body-font-weight: 400;--bs-body-line-height: 1.5;--bs-body-color: #353638;--bs-body-color-rgb: 53,54,56;--bs-body-bg: #F5F7FA;--bs-body-bg-rgb: 245,247,250;--bs-emphasis-color: #202123;--bs-emphasis-color-rgb: 32,33,35;--bs-secondary-color: rgba(53,54,56,0.75);--bs-secondary-color-rgb: 53,54,56;--bs-secondary-bg: #CACCCF;--bs-secondary-bg-rgb: 202,204,207;--bs-tertiary-color: rgba(53,54,56,0.5);--bs-tertiary-color-rgb: 53,54,56;--bs-tertiary-bg: #E0E2E4;--bs-tertiary-bg-rgb: 224,226,228;--bs-heading-color: inherit;--bs-link-color: #333C4A;--bs-link-color-rgb: 51,60,74;--bs-link-decoration: underline;--bs-link-hover-color: #29303b;--bs-link-hover-color-rgb: 41,48,59;--bs-code-color: RGB(var(--bs-emphasis-color-rgb, 0, 0, 0));--bs-highlight-bg: #fff3cd;--bs-border-width: 1px;--bs-border-style: solid;--bs-border-color: #B5B7BA;--bs-border-color-translucent: rgba(32,33,35


        "source": "The index *{{ctx.index}}* failed to rollover."
      }
    },
    "states": [
      {
        "name": "ingest",
        "actions": [
          {
            "rollover": {
              "min_doc_count": 5
            }
          }
        ],
        "transitions": [
          {
            "state_name": "search"
          }
        ]
      },
      {
        "name": "search",
        "actions": [],
        "transitions": [
          {
            "state_name": "delete",
            "conditions": {
              "min_index_age": "5m"
            }
          }
        ]
      },
      {
        "name": "delete",
        "actions": [
          {
            "delete": {}
          }
        ],
        "transitions": []
      }
    ]
  }
}
  EOF
}
`

var testAccElasticsearchOpenDistroISMPolicyOpenSearch11 = `
resource "elasticsearch_opendistro_ism_policy" "test_policy" {
  policy_id = "test_policy"
  body      = <<EOF
{
  "policy":{
    "description":"ingesting logs",
    "default_state":"ingest",
    "ism_template":[
      {
        "index_patterns":[
          "foo-*"
        ],
        "priority":0
      }
    ],
    "error_notification":{
      "destination":{
        "slack":{
          "url":"https://webhook.slack.example.com"
        }
      },
      "message_template":{
        "lang":"mustache",
        "source":"The index *{{ctx.index}}* failed to rollover."
      }
    },
    "states":[
      {
        "name":"ingest",
        "actions":[
          {
            "rollover":{
              "min_doc_count":5
            }
          }
        ],
        "transitions":[
          {
            "state_name":"search"
          }
        ]
      },
      {
        "name":"search",
        "actions":[],
        "transitions":[
          {
            "state_name":"delete",
            "conditions":{
              "min_index_age":"5m"
            }
          }
        ]
      },
      {
        "name":"delete",
        "actions":[
          {
            "delete":{}
          }
        ],
        "transitions":[]
      }
    ]
  }
}
  EOF
}
`
package es

import (
	"context"
	"encoding/json"
	"errors"
	"fmt"
	"log"
	"net/http"
	"time"

	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
	"github.com/olivere/elastic/uritemplates"

	elastic7 "github.com/olivere/elastic/v7"
)

var openDistroRolesMappingSchema = map[string]*schema.Schema{
	"role_name": {
		Type:     schema.TypeString,
		Required: true,
		ForceNew: true,
	},
	"backend_roles": {
		Type:     schema.TypeSet,
		Optional: true,
		Elem:     &schema.Schema{Type: schema.TypeString},
	},
	"hosts": {
		Type:     schema.TypeSet,
		Optional: true,
		Elem:     &schema.Schema{Type: schema.TypeString},
	},
	"users": {
		Type:     schema.TypeSet,
		Optional: true,
		Elem:     &schema.Schema{Type: schema.TypeString},
	},
	"description": {
		Type:     schema.TypeString,
		Optional: true,
	},
	"and_backend_roles": {
		Type:     schema.TypeSet,
		Optional: true,
		Elem:     &schema.Schema{Type: schema.TypeString},
	},
}

func resourceOpenSearchRolesMapping() *schema.Resour


                                 cAKeyParams.getQ(),
 *                                            cAKeyParams.getG());
 * DSAPublicKey usableKey = kf.generatePublic(ks);
 * </pre></code>
 *
 * @see java.security.interfaces.DSAParams
 * @see java.security.interfaces.DSAPublicKey
 * @see java.security.KeyFactory
 * @see java.security.spec.DSAPublicKeySpec
 *
 * @author David Brownell
 */
public final
class AlgIdDSA extends AlgorithmId implements DSAParams
{

    private static final long serialVersionUID = 3437177836797504046L;

    /*
     * The three unsigned integer parameters.
     */
    private BigInteger  p , q, g;

    /** Returns the DSS/DSA parameter "P" */
    public BigInteger   getP () { return p; }

    /** Returns the DSS/DSA parameter "Q" */
    public BigInteger   getQ () { return q; }

    /** Returns the DSS/DSA parameter "G" */
    public BigInteger   getG () { return g; }

    /**
     * Default constructor.  The OID and parameters must be
     * deserialized before this algorithm ID is used.
     */
    // XXX deprecated for general use
    public AlgIdDSA () {}

    AlgIdDSA (DerValue val) throws IOException
        { super(val.getOID()); }

    /**
     * Construct an AlgIdDSA from an X.509 encoded byte array.
     */
    public AlgIdDSA (byte[] encodedAlg) throws IOException
        { super (new DerValue(encodedAlg).getOID()); }

    /**
     * Constructs a DSS/DSA Algorithm ID from unsigned integers that
     * define the algorithm parameters.  Those integers are encoded
     * as big-endian byte arrays.
     *
     * @param p the DSS/DSA paramter "P"
     * @param q the DSS/DSA paramter "Q"
     * @param g the DSS/DSA paramter "G"
     */
    public AlgIdDSA (byte p [], byte q [], byte g [])
    throws IOException
    {
        this (new BigInteger (1, p),
            new BigInteger (1, q),
            new BigInteger (1, g));
    }

    /**
     * Constructs a DSS/DSA Algorithm ID from numeric parameters.
     * If all three are null, then the parameters portion of the algorithm id
     * is set to null.  See note in header regarding use.
     *
     * @param p the DSS/DSA paramter "P"
     * @param q the DSS/DSA paramter "Q"
     * @param g the DSS/DSA paramter "G"
     */
    public AlgIdDSA (BigInteger p, BigInteger q, BigInteger g)
    {
        super (DSA_oid);

        if (p != null || q != null || g != null) {
            if (p == null || q == null || g == null)
                throw new ProviderException("Invalid parameters for DSS/DSA" +
                                            " Algorithm ID");
            try {
                this.p = p;
                this.q = q;
                this.g = g;
                initializeParams ();

            } catch (IOException e) {
                /* this should not happen */
                throw new ProviderException ("Construct DSS/DSA Algorithm ID");
            }
        }
    }

    /**
     * Returns "DSA", indicating the Digital Signature Algorithm (DSA) as
     * defined by the Digital Signature Standard (DSS), FIPS 186.
     */
    public String getName ()
        { return "DSA"; }

    /*
     * For algorithm IDs which haven't been created from a DER encoded
     * value, "params" must be created.
     */
    private void initializeParams ()
    throws IOException
    {
        DerOutputStream out = new DerOutputStream ();

        out.putInteger(p);
        out.putInteger(q);
        out.putInteger(g);
        params = new DerValue (DerValue.tag_Sequence,out.toByteArray ());
    }

    /**
     * Parses algorithm parameters P, Q, and G.  They're found
     * in the "params" member, which never needs to be changed.
     */
    protected void decodeParams ()
    throws IOException


IDIP: c_int = 6;
pub const UNW_EBADFRAME: c_int = 7;
pub const UNW_EINVAL: c_int = 8;
pub const UNW_EBADVERSION: c_int = 9;
pub const UNW_ENOINFO: c_int = 10;

pub type unw_regnum_t = c_int;

pub enum unw_addr_space {}
pub type unw_addr_space_t = *mut unw_addr_space;

#[repr(C)]
pub enum unw_caching_policy_t {
    UNW_CACHE_NONE,
    UNW_CACHE_GLOBAL,
    UNW_CACHE_PER_THREAD,
}

#[repr(C)]
pub enum unw_save_loc_type_t {
    UNW_SLT_NONE,
    UNW_SLT_MEMORY,
    UNW_SLT_REG,
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct unw_cursor_t {
    pub opaque: [unw_word_t; UNW_TDEP_CURSOR_LEN as usize],
}

pub type unw_context_t = unw_tdep_context_t;

#[repr(C)]
#[derive(Copy, Clone)]
pub struct unw_proc_info_t {
    pub start_ip: unw_word_t,
    pub end_ip: unw_word_t,
    pub lsda: unw_word_t,
    pub handler: unw_word_t,
    pub gp: unw_word_t,
    pub flags: unw_word_t,
    pub format: c_int,
    pub unwind_info_size: c_int,
    pub unwind_info: *mut c_void,
    pub extra: unw_tdep_proc_info_t,
}

#[repr(C)]
pub struct unw_accessors_t {
    pub find_proc_info: Option<
        unsafe extern "C" fn(
            asp: unw_addr_space_t,
            ip: unw_word_t,
            pip: *mut unw_proc_info_t,
            need_unwind_info: c_int,
            arg: *mut c_void,
        ) -> c_int,
    >,
    pub put_unwind_info: Option<
        unsafe extern "C" fn(
            asp: unw_addr_space_t,
            pip: *mut unw_proc_info_t,
            arg: *mut c_void,
        ) -> c_void,
    >,
    pub get_dyn_info_list_addr: Option<
        unsafe extern "C" fn(
            asp: unw_addr_space_t,
            dilap: *mut unw_word_t,
            arg: *mut c_void,
        ) -> c_int,
    >,
    pub access_mem: Option<
        unsafe extern "C" fn(
            asp: unw_addr_space_t,
            addr: unw_word_t,
            valp: *mut unw_word_t,
            write: c_int,
            arg: *mut c_void,
        ) -> c_int,
    >,
    pub access_reg: Option<
        unsafe extern "C" fn(
            asp: unw_addr_space_t,
            regnum: unw_regnum_t,
            valp: *mut unw_word_t,
            write: c_int,
            arg: *mut c_void,
        ) -> c_int,
    >,
    // unw_fpreg_t is a long double :(
    access_fpreg: Option<unsafe extern "C" fn()>,
    pub resume: Option<
        unsafe extern "C" fn(
            asp: unw_addr_space_t,
            cp: *mut unw_cursor_t,
            arg: *mut c_void,
        ) -> c_int,
    >,
    pub get_proc_name: Option<
        unsafe extern "C" fn(
            asp: unw_addr_space_t,
            addr: unw_word_t,
            bufp


using UnityEngine;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Internal;

namespace UnityEditor.ShaderGraph
{
    [FormerName("UnityEngine.MaterialGraph.ViewDirectionNode")]
    [Title("Input", "Geometry", "View Direction")]
    class ViewDirectionNode : GeometryNode, IMayRequireViewDirection
    {
        private const int kOutputSlotId = 0;
        public const string kOutputSlotName = "Out";

        public ViewDirectionNode()
        {
            name = "View Direction";
            UpdateNodeAfterDeserialization();
        }

        public sealed override void UpdateNodeAfterDeserialization()
        {
            AddS


/*
 * Copyright (c) 2013-2016 ARM Limited. All rights reserved.
 * Copyright (c) 2016, Freescale Semiconductor, Inc. Not a Contribution.
 * Copyright 2016-2021 NXP. Not a Contribution.
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Licensed under the Apache License, Version 2.0 (the License); you may
 * not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef _FSL_ENET_PHY_CMSIS_H_
#define _FSL_ENET_PHY_CMSIS_H_
#include "Driver_ETH.h"
#include "Driver_ETH_PHY.h"
#include "RTE_Device.h"
#include "fsl_common.h"
#include "fsl_phy.h"

extern phy_handle_t phyHandle;

#if RTE_ENET
extern ARM_DRIVER_ETH_PHY Driver_ETH_PHY0;
#endif
#endif


TO));
        return new PageResult<>(setmealVOPage.getTotal(), setmealVOPage.getResult(), setmealVOPage.getPageSize(), setmealVOPage.getPageNum());
    }

    @Override
    public SetmealVO getSetMealById(Long id) {
        SetmealVO setmealVO = setMealMapper.getSetMealById(id);
        if (setmealVO == null) {
            throw new BusinessException("套餐ID不存在");
        }
        return setmealVO;
    }

    @Override
    @Transactional
    public boolean updateSetMeal(SetmealDTO setmealDTO) {
        SetmealVO setmealVO = setMealMapper.getSetMealById(setmealDTO.getId());
        if (setmealVO == null) {
            throw new BusinessException("套餐ID不存在");
        }
        if (!setmealDTO.getName().equals(setmealVO.getName())) {
            int count = setMealMapper.getByMealName(setmealDTO.getName());
            if (count != 0) {
                throw new BusinessException("套餐名称重复");
            }
        }

        Setmeal setmeal = new Setmeal();
        BeanUtils.copyProperties(setmealDTO, setmeal);

        if (!setmealDTO.getImage().equals(setmealVO.getImage())) {
            // 如果上传的图片路径不同，需要删除原来的oss图片
            aliOssUtil.deleteFile(setmealVO.getImage());
        }

        int affectRow = setMealMapper.updateSetMeal(setmeal);

        // 更新套餐菜品关系
        // 删除原来的套餐菜品
        setMealDishMapper.delSetMealDishById(setmealDTO.getId());
        // 新增套餐菜品, 菜品列表不可能为空
        // 查找套餐下的菜品ID是否存在，并且要求是起售中
        List<SetmealDish> setmealDishes = setmealDTO.getSetmealDishes();
        checkDishExistAndSelling(setmealDishes);
        setmealDishes.forEach(setmealDish -> setmealDish.setSetmealId(setmeal.getId()));
        setMealDishMapper.saveSetmealDishBatch(setmealDishes);
        deleteAllSetMealCache();
        return affectRow > 0;
    }

    @Override
    public boolean updateSetMealStatus(Long id, Integer status) {
        SetmealVO setmealVO = setMealMapper.getSetMealById(id);
        if (setmealVO == null) {
            throw new BusinessException("套餐ID不存在");
        }
        Setmeal setmeal = new Setmeal();
        BeanUtils.copyProperties(setmealVO, setmeal);
        setmeal.setStatus(status);
        int affectRow = setMealMapper.updateSetMeal(setmeal);
        deleteAllSetMealCache();
        return affectRow > 0;
    }

    @Override
    public boolean deleteSetMealByIds(List<Long> ids) {
        // 查找处于非起售状态的套餐
        List<Long> sellingSetMealIds = setMealMapper.getSellingSetMealByIds(ids);
        List<Long> notSellingSetMealIds = ids.stream().filter(aLong -> !sellingSetMealIds.contains(aLong)).collect(Collectors.toList());

        int affectRows = 0;
        if (!CollectionUtils.isEmpty(notSellingSetMealIds)) {

            List<String> images = setMealMapper.getSetMealImagesByIds(notSellingSetMealIds);
            aliOssUtil.deleteFileBatch(images);
            // 删除套餐
            affectRows += setMealMapper.del


/* ================================================================
 *
 * PyCA Project
 *
 * Copyright (c) J. Samuel Preston, Linh K. Ha, Sarang C. Joshi. All
 * rights reserved.  See Copyright.txt or for details.
 *
 * This software is distributed WITHOUT ANY WARRANTY; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE.  See the above copyright notice for more information.
 *
 * ================================================================ */

#ifndef __GPU_SPLAT_H
#define __GPU_SPLAT_H

#include <estream.h>
#include <pycaUtils.h>

namespace PyCA {
  namespace Splatting{

    void splatDistance(int* d_id, size_t sizeX, size_t sizeY, size_t sizeZ,
		       const float* d_px , const float* d_py, const float* d_pz,
		       size_t nP, StreamT stream);

    void splat3D(int* d_iwd,
		 size_t sizeX, size_t sizeY, size_t sizeZ,
		 const float* d_w,
		 const float* d_px , const float* d_py, const float* d_pz,
		 size_t nP, StreamT stream);

    void splat3D(int* d_iwdx, int* d_iwdy, int* d_iwdz,
		 size_t sizeX, size_t sizeY, size_t sizeZ,
		 const float* d_wx, const float* d_wy, const float* d_wz,
		 const float* d_px , const float* d_py, const float* d_pz,
		 size_t nP, StreamT stream);

    void splat3D(int* d_iwd, int* d_id,
		 uint sizeX, uint sizeY, uint sizeZ,
		 const float* d_w,
		 const float* d_px , const float* d_py, const float* d_pz,
		 uint nP, StreamT stream);

    void splat3D(int* d_iwdx, int* d_iwdy, int* d_iwdz, int* d_id,
		 size_t sizeX, size_t sizeY, size_t sizeZ,
		 const float* d_wx, const float* d_wy, const float* d_wz,
		 const float* d_px , const float* d_py, const float* d_pz,
		 size_t nP, StreamT stream);

    void convertWeightedDistance_I(float* d_fwd, const int* d_id, size_t n, StreamT stream);
    void convertWeightedDistance_I(float* d_fx, float* d_fy, float* d_fz, const int* d_id, size_t n, StreamT stream);

    void convertWeightedDistance(float* d_fwd, const int* d_iwd,
				 const int* d_id, size_t n, StreamT stream);

    void FixedToFloating(float* d_o, const int* d_i, size_t n, StreamT stream);
    void FixedToFloating(float* d_ox, float* d_oy, float* d_oz,
			 const int* d_ix, const int* d_iy,const int* d_iz, size_t n, StreamT stream);

    void FixedToFloating_I(float* d_o, size_t n, StreamT stream);
    void FixedToFloating_I(float* d_ox, float* d_oy, float* d_oz, size_t n, StreamT stream);

  }// end namespace Splatting
} // end namespace PyCA

#endif


("f")
      .addParametersMatcher(types -> types.size() == 2 && types.get(0).is("int") && !types.get(1).is("int")).build()))
      .containsExactly(4, 9);
  }

  @Test
  void test_tree_and_symbol_and_or() {
    String source = "" +
      /* 01 */ "package pkg;\n" +
      /* 02 */ "import java.util.function.*;\n" +
      /* 03 */ "class A { \n" +
      /* 04 */ "  A(int x) { }\n" +
      /* 05 */ "  void f(int x) { }\n" +
      /* 06 */ "  void main() {\n" +
      /* 07 */ "    A a = new A(12);\n" +
      /* 08 */ "    a.f(12);\n" +
      /* 09 */ "    Consumer<Integer> c = a::f;\n" +
      /* 10 */ "    Supplier<A> s = A::new;\n" +
      /* 11 */ "  }\n" +
      /* 12 */ "} \n";

    // method f(int)
    assertThat(findMatchesOnTree(source, MethodMatchers.create().ofTypes("pkg.A").names("f").addParametersMatcher("int").build()))
      .containsExactly(5, 8, 9);
    assertThat(findMatchesOnSymbol(source, MethodMatchers.create().ofTypes("pkg.A").names("f").addParametersMatcher("int").build()))
      .containsExactly(5, 8); // missing 9 because symbol.isMethodSymbol() of method reference return false

    // constructor
    assertThat(findMatchesOnTree(source, MethodMatchers.create().ofTypes("pkg.A").constructor().addParametersMatcher("int").build()))
      .containsExactly(4, 7); // missing 10 because "A::new" is an unknown type
    assertThat(findMatchesOnSymbol(source, MethodMatchers.create().ofTypes("pkg.A").constructor().addParametersMatcher("int").build()))
      .containsExactly(4, 7);

    // or
    assertThat(findMatchesOnTree(source, MethodMatchers.or(
      MethodMatchers.create().ofTypes("pkg.A").constructor().addParametersMatcher("int").build(),
      MethodMatchers.create().ofTypes("pkg.A").names("f").addParametersMatcher("int").build())))
      .containsExactly(4, 5, 7, 8, 9);
    assertThat(findMatchesOnSymbol(source, MethodMatchers.or(
      MethodMatchers.create().ofTypes("pkg.A").constructor().addParametersMatcher("int").build(),
      MethodMatchers.create().ofTypes("pkg.A").names("f").addParametersMatcher("int").build())))
      .containsExactly(4, 5, 7, 8);

    // empty
    assertThat(findMatchesOnTree(source, MethodMatchers.none())).isEmpty();
    assertThat(findMatchesOnSymbol(source, MethodMatchers.none())).isEmpty();
  }

  @Test
  void test_inheritance() {
    String source = "" +
      /* 01 */ "package pkg;\n" +
      /* 02 */ "class A { }\n" +
      /* 03 */ "interface I {\n" +
      /* 04 */ "  void f();\n" +
      /* 05 */ "  void f(int x);\n" +
      /* 06 */ "}\n" +
      /* 07 */ "@FunctionalInterface\n" +
      /* 08 */ "interface J {\n" +
      /* 09 */ "  void f(int x);\n" +
      /* 10 */ "}\n" +
      /* 11 */ "abstract class B extends A implements I, J {\n" +
      /* 12 */ "  public void f() { }\n" +
      /* 13 */ "}\n" +
      /* 14 */ "class C extends B {\n" +
      /* 15 */ "  @Override\n" +
      /* 16 */ "  public void f(int x) { }\n" +
      /* 17 */ "}\n" +
      /* 18 */ "class D extends C {\n" +
      /* 19 */ "  @Override\n" +
      /* 20 */ "  public void f(int x) { }\n" +


QPainter::CompositionMode_SourceOver, tr("SourceOver"));
    addOp(QPainter::CompositionMode_DestinationOver, tr("DestinationOver"));
    addOp(QPainter::CompositionMode_Clear, tr("Clear"));
    addOp(QPainter::CompositionMode_Source, tr("Source"));
    addOp(QPainter::CompositionMode_Destination, tr("Destination"));
    addOp(QPainter::CompositionMode_SourceIn, tr("SourceIn"));
    addOp(QPainter::CompositionMode_DestinationIn, tr("DestinationIn"));
    addOp(QPainter::CompositionMode_SourceOut, tr("SourceOut"));
    addOp(QPainter::CompositionMode_DestinationOut, tr("DestinationOut"));
    addOp(QPainter::CompositionMode_SourceAtop, tr("SourceAtop"));
    addOp(QPainter::CompositionMode_DestinationAtop, tr("DestinationAtop"));
    addOp(QPainter::CompositionMode_Xor, tr("Xor"));
    addOp(QPainter::CompositionMode_Plus, tr("Plus"));
    addOp(QPainter::CompositionMode_Multiply, tr("Multiply"));
    addOp(QPainter::CompositionMode_Screen, tr("Screen"));
    addOp(QPainter::CompositionMode_Overlay, tr("Overlay"));
    addOp(QPainter::CompositionMode_Darken, tr("Darken"));
    addOp(QPainter::CompositionMode_Lighten, tr("Lighten"));
    addOp(QPainter::CompositionMode_ColorDodge, tr("ColorDodge"));
    addOp(QPainter::CompositionMode_ColorBurn, tr("ColorBurn"));
    addOp(QPainter::CompositionMode_HardLight, tr("HardLight"));
    addOp(QPainter::CompositionMode_SoftLight, tr("SoftLight"));
    addOp(QPainter::CompositionMode_Difference, tr("Difference"));
    addOp(QPainter::CompositionMode_Exclusion, tr("Exclusion"));
//! [1]

//! [2]
    destinationButton = new QToolButton;
    destinationButton->setIconSize(resultSize);

    equalLabel = new QLabel(tr("="));

    resultLabel = new QLabel;
    resultLabel->setMinimumWidth(resultSize.width());
//! [2]

//! [3]
    connect(sourceButton, SIGNAL(clicked()), this, SLOT(chooseSource()));
    connect(operatorComboBox, SIGNAL(activated(int)),
            this, SLOT(recalculateResult()));
    connect(destinationButton, SIGNAL(clicked()),
            this, SLOT(chooseDestination()));
//! [3]

//! [4]
    QGridLayout *mainLayout = new QGridLayout;
    mainLayout->addWidget(sourceButton, 0, 0, 3, 1);
    mainLayout->addWidget(operatorComboBox, 1, 1);
    mainLayout->addWidget(destinationButton, 0, 2, 3, 1);
    mainLayout->addWidget(equalLabel, 1, 3);
    mainLayout->addWidget(resultLabel, 0, 4, 3, 1);
    mainLayout->setSizeConstraint(QLayout::SetFixedSize);
    setLayout(mainLayout);
//! [4]

//! [5]
    resultImage = QImage(resultSize, QImage::Format_ARGB32_Premultiplied);

    loadImage(":/images/butterfly.png", &sourceImage, sourceButton);
    loadImage(":/images/checker.png", &destinationImage, destinationButton);

    setWindowTitle(tr("Image Composition"));
}
//! [5]

//! [6]
void ImageComposer::chooseSource()
{
    chooseImage(tr("Choose Source Image"), &sourceImage, sourceButton);
}
//! [6]

//! [7]
void ImageComposer::chooseDestination()
{
    chooseImage(tr("Choose Destination Image"), &destinationImage,
                destinationButton);
}
//! [7]

//! [8]
void ImageComposer::recalculateResult()
{
    QPainter::CompositionMode mode = currentMode();

    QPainter painter(&resultImage);
    painter.setCompositionMode(QPainter::CompositionMode_Source);
    painter.fillRect(resultImage.rect(), Qt::transparent);
    painter.setCompositionMode(QPainter


 just be skipped by the decoder.

Legacy frame
------------

The Legacy frame format was defined into the initial versions of “LZ4Demo”.
Newer compressors should not use this format anymore, as it is too restrictive.

Main characteristics of the legacy format :

- Fixed block size : 8 MB.
- All blocks must be completely filled, except the last one.
- All blocks are always compressed, even when compression is detrimental.
- The last block is detected either because
  it is followed by the “EOF” (End of File) mark,
  or because it is followed by a known Frame Magic Number.
- No checksum
- Convention is Little endian

| MagicNb | B.CSize | CData | B.CSize | CData |  (...)  | EndMark |
| ------- | ------- | ----- | ------- | ----- | ------- | ------- |
| 4 bytes | 4 bytes | CSize | 4 bytes | CSize | x times |   EOF   |

__Magic Number__

4 Bytes, Little endian format.
Value : 0x184C2102

__Block Compressed Size__

This is the size, in bytes, of the following compressed data block.
4 Bytes, Little endian format.

__Data__

Where the actual compressed data stands.
Data is always compressed, even when compression is detrimental.

__EndMark__

End of legacy frame is implicit only.
It must be followed by a standard EOF (End Of File) signal,
wether it is a file or a stream.

Alternatively, if the frame is followed by a valid Frame Magic Number,
it is considered completed.
It makes legacy frames compatible with frame concatenation.

Any other value will be interpreted as a block size,
and trigger an error if it does not fit within acceptable range.

Version changes
---------------

1.5.1 : changed format to MarkDown compatible

1.5 : removed Dictionary ID from specification

1.4.1 : changed wording from “stream” to “frame”

1.4 : added skippable streams, re-added stream checksum

1.3 : modified header checksum

1.2 : reduced choice of “block size”, to postpone decision on “dynamic size of BlockSize Field”.

1.1 : optional fields are now part of the descriptor

1.0 : changed “block size” specification, adding a compressed/uncompressed flag

0.9 : reduced scale of “block maximum size” table

0.8 : removed : high compression flag

0.7 : removed : stream checksum

0.6 : settled : stream size uses 8 bytes, endian conv


maciter);

    time_hmac_evp(context, 16, hmaciter);
    time_hmac_evp(context, 32, hmaciter);
    time_hmac_evp(context, 512, hmaciter);
    time_hmac_evp(context, 1024, hmaciter);
    time_hmac_evp(context, 2048, hmaciter);
    time_hmac_evp(context, 4096, hmaciter);
    time_hmac_evp(context, 8192, hmaciter);
    time_hmac_evp(context, 16384, hmaciter);
    time_hmac_evp(context, 32768, hmaciter);

    for (i = 0; i < sizeof(enctypes)/sizeof(enctypes[0]); i++) {

	krb5_enctype_enable(context, enctypes[i]);

	time_encryption(context, 16, enctypes[i], enciter);
	time_encryption(context, 32, enctypes[i], enciter);
	time_encryption(context, 512, enctypes[i], enciter);
	time_encryption(context, 1024, enctypes[i], enciter);
	time_encryption(context, 2048, enctypes[i], enciter);
	time_encryption(context, 4096, enctypes[i], enciter);
	time_encryption(context, 8192, enctypes[i], enciter);
	time_encryption(context, 16384, enctypes[i], enciter);
	time_encryption(context, 32768, enctypes[i], enciter);

	time_s2k(context, enctypes[i], "mYsecreitPassword", salt, s2kiter);
    }

    krb5_free_context(context);

    return 0;
}


le="text-align: center;">9）fields_count 和 field_info, fields_count表示类中field_info表的数量，而field_info表示类的实例变量和类变量，这里需要注意的是 field_info不包含从父类继承过来的字段，field_info的结构如下图所示：

其中access_flags表示字段的访问标示，比如public,private,protected，static,final等，access_flags的取值如下图所示：

其中name_index 和 descriptor_index都是常量池的索引值，分别表示字段的名称和字段的描述符，字段的名称容易理解，但是字段的描述符如何理解呢？其实在JVM 规范中，对于字段的描述符规定如下图所示：

其中大家需要关注一下上图最后一行，它表示的是对一维数组的描述符，对于String[][]的描述符将是[[ Ljava/lang/String,而对于int[][]的描述符为[[I。接下来的attributes_count以及 attribute_info分别表示属性表的数量以及属性表。下面我们还是以上面的TestClass为例，来看看TestClass的字段表吧。

首先我们来看一下字段的数量，TestClass的字段的数量如下图所示：

从上图中可以看出TestClass有两个字段，查看TestClass的源代码可知，确实也只有两个字段，接下来我们看看第一个字段，我们知道第一个字段应该为private int staticVar,它在Class文件中的二进制表示如下图所示：

其中0x001A表示访问标示，通过查看access_flags表可知，其为ACC_PRIVATE,ACC_STATIC,ACC_FINAL,接下 来0x0006和0x0007分别表示常量池中第6和第7个常量，通过查看常量池可知，其值分别为：staticVar和I，其中staticVar为字 段名称，而I为字段的描述符，通过


/*********************************************************************/
/*                                                                   */
/*             Optimized BLAS libraries                              */
/*                     By Kazushige Goto <kgoto@tacc.utexas.edu>     */
/*                                                                   */
/* Copyright (c) The University of Texas, 2009. All rights reserved. */
/* UNIVERSITY EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES CONCERNING  */
/* THIS SOFTWARE AND DOCUMENTATION, INCLUDING ANY WARRANTIES OF      */
/* MERCHANTABILITY, FITNESS FOR ANY PARTICULAR PURPOSE,              */
/* NON-INFRINGEMENT AND WARRANTIES OF PERFORMANCE, AND ANY WARRANTY  */
/* THAT MIGHT OTHERWISE ARISE FROM COURSE OF DEALING OR USAGE OF     */
/* TRADE. NO WARRANTY IS EITHER EXPRESS OR IMPLIED WITH RESPECT TO   */
/* THE USE OF THE SOFTWARE OR DOCUMENTATION.                         */
/* Under no circumstances shall University be liable for incidental, */
/* special, indirect, direct or consequential damages or loss of     */
/* profits, interruption of business, or related expenses which may  */
/* arise from use of Software or Documentation, including but not    */
/* limited to those resulting from defects in Software and/or        */
/* Documentation, or loss or inaccuracy of data of any kind.         */
/*********************************************************************/

#define ASSEMBLER
#include "common.h"

#define STACK	12
#define ARGS	 0

#define STACK_M		 4 + STACK + ARGS(%esp)
#define STACK_ALPHA	16 + STACK + ARGS(%esp)
#define STACK_X		32 + STACK + ARGS(%esp)
#define STACK_INCX	36 + STACK + ARGS(%esp)
#define STACK_Y		40 + STACK + ARGS(%esp)
#define STACK_INCY	44 + STACK + ARGS(%esp)

#define M	%ebx
#define X	%esi
#define INCX	%ecx
#define Y	%edi
#define INCY	%edx

	PROLOGUE

	pushl	%edi
	pushl	%esi
	pushl	%ebx

	PROFCODE

#if defined(F_INTERFACE_GFORT) || defined(F_INTERFACE_G95)
	EMMS
#endif

	FLD	STACK_ALPHA

	movl	STACK_M,    M
	movl	STACK_X,    X
	movl	STACK_INCX, INCX
	movl	STACK_Y,    Y
	movl	STACK_INCY, IN


//
//  Copyright 2010-2018 Deveel
//
//    Licensed under the Apache License, Version 2.0 (the "License");
//    you may not use this file except in compliance with the License.
//    You may obtain a copy of the License at
//
//        http://www.apache.org/licenses/LICENSE-2.0
//
//    Unless required by applicable law or agreed to in writing, software
//    distributed under the License is distributed on an "AS IS" BASIS,
//    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//    See the License for the specific language governing permissions and
//    limitations under the License.
//

using System;

namespace Deveel.Data.Query {
	/// <summary>
	/// Enumerates


ING",
    CREATE_BOOKING_SUCCESS = "CREATE_BOOKING_SUCCESS",
    CREATE_BOOKING_FAIL = "CREATE_BOOKING_FAIL",
    DELETE_BOOKING = "DELETE_BOOKING",
    DELETE_BOOKING_SUCCESS = "DELETE_BOOKING_SUCCESS",
    DELETE_BOOKING_FAIL = "DELETE_BOOKING_FAIL",
}

export interface FetchBookings {
    type: BookingActionTypes.FETCH_BOOKINGS;
    idRoom: number;
    date: Date;
}

interface FetchBookingsSuccess {
    type: BookingActionTypes.FETCH_BOOKINGS_SUCCESS;
    payload: Booking;
}

interface FetchBookingsFail {
    type: BookingActionTypes.FETCH_BOOKINGS_FAIL;
}

export interface CreateBooking {
    type: BookingActionTypes.CREATE_BOOKING;
    bookingToCreate: Booking;
}

interface CreateBookingSuccess {
    type: BookingActionTypes.CREATE_BOOKING_SUCCESS;
    payload: Booking;
}

interface CreateBookingFail {
    type: BookingActionTypes.CREATE_BOOKING_FAIL;
}

export interface DeleteBooking {
    type: BookingActionTypes.DELETE_BOOKING;
    idToDelete: number;
}

interface DeleteBookingSuccess {
    type: BookingActionTypes.DELETE_BOOKING_SUCCESS;
}

interface DeleteBookingFail {
    type: BookingActionTypes.DELETE_BOOKING_FAIL;
}

export const fetchBookingsForDateAndRoom = (idRoom: number, date: Date): FetchBookings => ({
    type: BookingActionTypes.FETCH_BOOKINGS,
    idRoom: idRoom,
    date: date,
});

export const createBooking = (bookingToCreate: Booking): CreateBooking => ({
    type: BookingActionTypes.CREATE_BOOKING,
    bookingToCreate: bookingToCreate,
});

export const deleteBooking = (idToDelete: number): DeleteBooking => ({
    type: BookingActionTypes.DELETE_BOOKING,
    idToDelete: idToDelete,
});

export type BookingAction =
    | FetchBookings
    | FetchBookingsSuccess
    | FetchBookingsFail
    | CreateBooking
    | CreateBookingSuccess
    | CreateBookingFail
    | DeleteBooking
    | DeleteBookingSuccess
    | DeleteBookingFail;import React from "react";

export interface InputProps {
    type: 'text';
    id?: string;
    name?: string;
    placeholder: string;
    value?: string | number | readonly string[];
    onChange: React.ChangeEventHandler<HTMLInputElement>;
}

export interface TextProps {
    children: React.ReactNode;
    color: string;
    size?: string;
    type: 'heading' | 'paragraph' | 'default' | 'sub-heading' | 'title';
    weight?: number;
}

export interface BookInfo {
    title: string;
    author_name: Array<string>;
    first_publish_year: number;
}

export function replacePlaceholdersInCode(
  code: string,
  mapping: { [key: string]: string | number }
): string {
  const regexStr = Object.keys(mapping)
    .map((key) => `\\$\{${key}}`)
    .join("|");

  const regex = new RegExp(regexStr, "gi");

  return code.replace(regex, (matched) => {
    const key = matched.substr(2, matched.length - 3);
    if (mapping.hasOwnProperty(key)) {
      return mapping[key]?.toString() || "";
    } else {
      return matched;
    }
  });
}
import { TypeAlert } from '../interface/alert-interface';
export class AlertModel {

    public type: TypeAlert;
    public message: string;
    constructor(type: TypeAlert, messa


 Time>::Moment>;

/// Configure the pallet by specifying the parameters and types on which it depends.
pub trait Config: frame_system::Config {
	/// Because this pallet emits events, it depends on the runtime's definition of an event.
	type Boobas: UniqueAssets<
		Self::AccountId,
		AssetId = Self::Hash,
		AssetInfo = BoobaInfoOf<Self>
	>;
    type Time: frame_support::traits::Time;
    type Randomness: frame_support::traits::Randomness<Self::Hash>;
    type Currency: frame_support::traits::LockableCurrency<Self::AccountId>;
    type BasePrice: Get<BalanceOf<Self>>;
	type Event: From<Event<Self>> + Into<<Self as frame_system::Config>::Event>;
}

// The pallet's runtime storage items.
// https://substrate.dev/docs/en/knowledgebase/runtime/storage
decl_storage! {
    trait Store for Module<T: Config> as Boobas {
        MetadataForBooba get(fn metadata_for_booba): map hasher(identity) T::Hash => BoobaMetadata;
    }
}

// Pallets use events to inform users when important changes are made.
// https://substrate.dev/docs/en/knowledgebase/runtime/events
decl_event!(
    pub enum Event<T>
    where
        BoobaId = <T as frame_system::Config>::Hash,
        AccountId = <T as frame_system::Config>::AccountId,
    {
        Conjured(BoobaId, AccountId),
    }
);

// Errors inform users that something went wrong.
decl_error! {
	pub enum Error for Module<T: Config> {
		BoobaConjureFail,
	}
}

// Dispatchable functions allows users to interact with the pallet and invoke state changes.
// These functions materialize as "extrinsics", which are often compared to transactions.
// Dispatchable functions must be annotated with a weight and must return a DispatchResult.
decl_module! {
    pub struct Module<T: Config> for enum Call where origin: T::Origin {
        type Error = Error<T>;
        fn deposit_event() = default;

        /// Reserve funds from the sender's account before conjuring them a kitty.
        ///
        /// The dispatch origin for this call must be Signed.
        #[weight = 10_000]
        pub fn conjure(origin, name: Vec<u8>) -> dispatch::DispatchResult {
            let who = ensure_signed(origin)?;
            T::Currency::set_lock(MODULE_ID, &who, T::BasePrice::get(), WithdrawReasons::FEE | WithdrawReasons::RESERVE);
            match T::Boobas::mint(&who, BoobaInfo{dob: T::Time::now(), dna: T::Randomness::random(&MODULE_ID)}) {
                Ok(id) => {
                    MetadataForBooba::<T>::insert(id, BoobaMetadata{name: name});
                    Self::deposit_event(RawEvent::Conjured(id, who));
                },
                Err(err) => Err(err)?
            }

            // TODO: allow senders to supply extra funds to lock, which will serve as a power boost

            Ok(())
        }

        // TODO: BOOST
        // power up a kitty by locking more funds
        // increases power without altering DNA
        // store as metadata in this pallet

        // TODO: RECOUP
        // remove boost and associated lock

        // TODO: FLIRT
        // post intent to breed, must have power boost

        // TODO: BREED
        // respond to intent to breed, must have power boost
        // DNA and power derived from parents
        // each parent randomly contributes power from boost
        // offspring owner randomly assigned between parent owners

        // TODO: SELL
        // post intent to sell including price

        // TODO: BUY
        // respond to intent to sell
        // transfer


map.api.maps.model.Circle@$refId::getHoleOptions([])');
    }

    // invoke native method
    final result = await MethodChannel('me.yohom/amap_map_fluttify').invokeMethod('com.amap.api.maps.model.Circle::getHoleOptions', {"refId": refId});

    // handle native call

    // convert native result to dart side object
    if (result == null) {
      return null;
    } else {
      kNativeObjectPool.addAll((result as List).cast<int>().map((it) => com_amap_api_maps_model_PolygonHoleOptions()..refId = it..tag = 'amap_map_fluttify').toList());
      return (result as List).cast<int>().map((it) => com_amap_api_maps_model_PolygonHoleOptions()..refId = it..tag = 'amap_map_fluttify').toList();
    }
  }

  Future<void> setStrokeDottedLineType(int var1) async {
    // print log
    if (fluttifyLogEnabled) {
      print('fluttify-dart: com.amap.api.maps.model.Circle@$refId::setStrokeDottedLineType([\'var1\':$var1])');
    }

    // invoke native method
    final result = await MethodChannel('me.yohom/amap_map_fluttify').invokeMethod('com.amap.api.maps.model.Circle::setStrokeDottedLineType', {"var1": var1, "refId": refId});

    // handle native call

    // convert native result to dart side object
    if (result == null) {
      return null;
    } else {

      return result;
    }
  }

  Future<int> getStrokeDottedLineType() async {
    // print log
    if (fluttifyLogEnabled) {
      print('fluttify-dart: com.amap.api.maps.model.Circle@$refId::getStrokeDottedLineType([])');
    }

    // invoke native method
    final result = await MethodChannel('me.yohom/amap_map_fluttify').invokeMethod('com.amap.api.maps.model.Circle::getStrokeDottedLineType', {"refId": refId});

    // handle native call

    // convert native result to dart side object
    if (result == null) {
      return null;
    } else {

      return result;
    }
  }

  //endregion
}

extension com_amap_api_maps_model_Circle_Batch on List<com_amap_api_maps_model_Circle> {
  //region getters

  //endregion

  //region setters

  //endregion

  //region methods
  Future<void> remove_batch() async {
    if (false) {
      return Future.error('all args must have same length!');
    }

    // invoke native method
    final resultBatch = await MethodChannel('me.yohom/amap_map_fluttify').invokeMethod('com.amap.api.maps.model.Circle::remove_batch', [for (int i = 0; i < this.length; i++) {"refId": this[i].refId}]);

    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).map((result) => result).toList();

      return typedResult;
    }
  }

  Future<List<String>> getId_batch() async {
    if (false) {
      return Future.error('all args must have same length!');
    }

    // invoke native method
    final resultBatch = await MethodChannel('


li)}
")
//                append(resources.getString(R.string.quality))
//                append("\t${convertNumericQualityToString(it.sleepQuality, resources)}
")
//                append(resources.getString(R.string.hours_slept))
//                // Hours
//                append("\t ${it.endTimeMilli.minus(it.startTimeMilli) / 1000 / 60 / 60}:")
//                // Minutes
//                append("${it.endTimeMilli.minus(it.startTimeMilli) / 1000 / 60}:")
//                // Seconds
//                append("${it.endTimeMilli.minus(it.startTimeMilli) / 1000}

")
//            }
//        }
//    }
//    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
//        return Html.fromHtml(sb.toString(), Html.FROM_HTML_MODE_LEGACY)
//    } else {
//        return HtmlCompat.fromHtml(sb.toString(), HtmlCompat.FROM_HTML_MODE_LEGACY)
//    }
//}
/*
 * Copyright 2019, The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.example.android.trackmysleepquality.database

import android.content.Context
import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase

/**
 * A database that stores SleepNight information.
 * And a global method to get access to the database.
 *
 * This pattern is pretty much the same for any database,
 * so you can reuse it.
 */
@Database(entities = [SleepNight::class], version = 1, exportSchema = false)
abstract class SleepDatabase : RoomDatabase() {

    /**
     * Connects the database to the DAO.
     */
    abstract val sleepDatabaseDao: SleepDatabaseDao

    /**
     * Define a companion object, this allows us to add functions on the SleepDatabase class.
     *
     * For example, clients can call `SleepDatabase.getInstance(context)` to instantiate
     * a new SleepDatabase.
     */
    companion object {
        /**
         * INSTANCE will keep a reference to any database returned via getInstance.
         *
         * This will help us avoid repeatedly initializing the database, which is expensive.
         *
         *  The value of a volatile variable will never be cached, and all writes and
         *  reads will be done to and from the main memory. It means that changes made by one
         *  thread to shared data are visible to other threads.
         */
        @Volatile
        private var INSTANCE: SleepDatabase? = null

        /**
         * Helper function to get the database.
         *
         * If a database has already been retrieved, the previous database will be returned.
         * Otherwise, create a new database.
         *
         * This function is threadsafe, and callers should cache the result for multiple database
         * calls to avoid overhead.
         *
         * This is an example of a simple Singleton pattern that takes another Singleton as an
         * argument in Kotlin.
         *
         * To learn more about Singleton read the wikipedia article:
         * https://en.wikipedia.org/wiki/Singleton_pattern
         *
         * @param context The application context Singleton, used to get access to the filesystem.
         */
        fun getInstance(context: Context): SleepDatabase {
            // Multiple threads can ask for the database at the same time, ensure we only initialize
            // it once by using synchronized


None = None"}, {"name": "expected_value", "types": ["int", "str"], "defaultValue": "0", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "expected_value: int | str = 0"}, {"name": "message", "types": ["str", "None"], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "message: str | None = None"}], "doc": "
Returns the count of elements found with selector.
\n
selector Selector which shall be counted. See the Finding elements section for details about the selectors.
\n
assertion_operator See Assertions for further details. Defaults to None.
\n
expected_value Expected value for the counting
\n
message overrides the default error message for assertion.
\n
Optionally asserts that the state matches the specified assertion. See Assertions for further details for the assertion arguments. By default assertion is not done.
\n
Example:
\n
\nGet Element Count    label    >    1\n
", "shortdoc": "Returns the count of elements found with ``selector``.", "tags": ["Assertion", "Getter", "PageContent"], "source": "/Users/tatuaalto/workspace/robotframework-playwright/Browser/keywords/getters.py", "lineno": 634}, {"name": "Get Element State", "args": [{"name": "selector", "types": ["str"], "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "selector: str"}, {"name": "state", "types": ["ElementStateKey"], "defaultValue": "visible", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "state: ElementStateKey = visible"}, {"name": "assertion_operator", "types": ["AssertionOperator", "None"], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "assertion_operator: AssertionOperator | None = None"}, {"name": "assertion_expected", "types": ["Any", "None"], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "assertion_expected: Any | None = None"}, {"name": "message", "types": ["str", "None"], "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "message: str | None = None"}], "doc": "
Get the given state from the element found by selector.
\n
If the selector does satisfy the expected state it will return True otherwise False.
\n
selector Selector of the corresponding object. See the Finding elements section for details about the selectors.
\n
state Defaults to visible. Possible states are:
\n
\n
attached : to be present in DOM.
\n
visible : to have non-empty bounding box and no visibility:hidden.
\n
disabled : to be disabled. Can be used on <button>, <fieldset>, <input>, <optgroup>, <option>, <select> and <textarea>.
\n
readonly : to be readOnly. Can be used on <input> and <textarea


_tests__/__util__'
const PushButton = withThemeProvider(ImportedPushButton)
const NextButton = withThemeProvider(ImportedNextButton)

// Note: test renderer must be required after react-native.

describe('PushButton', () => {
  it('matches snapshot', async () => {
    let component

    // eslint-disable-next-line require-await
    await renderer.act(async () => (component = renderer.create(<PushButton>Push</PushButton>)))
    const tree = component.toJSON()
    expect(tree).toMatchSnapshot()
  })
})

describe('NextButton', () => {
  it('matches snapshot', async () => {
    let component

    // eslint-disable-next-line require-await
    await renderer.act(async () => (component = renderer.create(<NextButton />)))
    const tree = component.toJSON()
    expect(tree).toMatchSnapshot()
  })
})
import { useCallback, useState } from 'react'

import { mapValues } from 'lodash'
import {
  fireEvent,
  GOTO_DISCORD,
  GOTO_DISCOURSE,
  GOTO_DONATE,
  GOTO_FB,
  GOTO_GDWEB,
  GOTO_GOODSWAP,
  GOTO_INSTA,
  GOTO_LEARN,
  GOTO_LINKIN,
  GOTO_MEDIUM,
  GOTO_TG,
  GOTO_USEGD,
  GOTO_VOTE,
  GOTO_X,
} from '../../../../lib/analytics/analytics'
import { useUserStorage } from '../../../../lib/wallet/GoodWalletProvider'
import Config from '../../../../config/config'
import { openLink } from '../../../../lib/utils/linking'

const { learnUrl, useGdUrl, donateUrl, voteUrl, goodSwapUrl } = Config

const addExtraProps = (value, key) => ({
  ...value,
  wasClickedProp: `${key}Clicked`,
  icon: value.icon ?? key,
})

export const externals = mapValues(
  {
    gdw: {
      url: 'https://ubi.gd/3RpmmLf',
      event: GOTO_GDWEB,
    },
    tg: {
      url: 'https://ubi.gd/3GF6f78',
      event: GOTO_TG,
    },
    x: {
      url: 'https://ubi.gd/twitter',
      event: GOTO_X,
    },
    dsc: {
      url: 'https://ubi.gd/3RQFtiN',
      event: GOTO_DISCOURSE,
    },
    inst: {
      url: 'https://ubi.gd/3RHJAxx',
      event: GOTO_INSTA,
    },
    dis: {
      url: 'https://ubi.gd/48wdaLR',
      event: GOTO_DISCORD,
    },
    med: {
      url: 'https://ubi.gd/3tm8GVT',
      event: GOTO_MEDIUM,
    },
    fb: {
      url: 'https://ubi.gd/48fL3At',
      event: GOTO_FB,
    },
    link: {
      url: 'https://ubi.gd/linkedin',
      event: GOTO_LINKIN,
    },
    learn: {
      url: learnUrl,
      event: GOTO_LEARN,
    },
    usegd: {
      url: useGdUrl,
      event: GOTO_USEGD,
    },
    donate: {
      url: donateUrl,
      event: GOTO_DONATE,
    },
    vote: {
      url: voteUrl,
      event: GOTO_VOTE,
    },
    gooddapp: {
      url: goodSwapUrl,
      event: GOTO_GOODSWAP,
    },
  },
  addExtraProps,
)

export default linkId => {
  const userStorage = useUserStorage()
  const { userProperties } = userStorage
  const { icon, wasClickedProp, url, event } = externals[linkId]

  const goToExternal = useCallback(() => openLink(url), [url])
  const [wasClicked, setWasClicked] = useState(() => userProperties?.get(wasClickedProp))

  const trackClicked = useCallback(() => {
    fireEvent(event, {
      firstTime: !wasClicked,
    })


�位<下邻位<起始位置>>, 目标位置>
  ? 是
  : 否

/**
 * 象需要遍历四个斜向“田”的位置，并且判断象眼
 */
type 象可以去那里吗<
  起始位置 extends 棋子坐标,
  目标位置 extends 棋子坐标,
  当前棋局 extends 棋局
> = 是 extends 相同位置<左邻位<左邻位<上邻位<上邻位<起始位置>>>>, 目标位置> // 左上
  ? 是 extends 该位置没有棋子<当前棋局, 左邻位<上邻位<起始位置>>> // 象眼
    ? 是
    : 否
  : 是 extends 相同位置<右邻位<右邻位<上邻位<上邻位<起始位置>>>>, 目标位置> // 右上
  ? 是 extends 该位置没有棋子<当前棋局, 右邻位<上邻位<起始位置>>> // 象眼
    ? 是
    : 否
  : 是 extends 相同位置<右邻位<右邻位<下邻位<下邻位<起始位置>>>>, 目标位置> // 右下
  ? 是 extends 该位置没有棋子<当前棋局, 右邻位<下邻位<起始位置>>> // 象眼
    ? 是
    : 否
  : 是 extends 相同位置<左邻位<左邻位<下邻位<下邻位<起始位置>>>>, 目标位置> // 左下
  ? 是 extends 该位置没有棋子<当前棋局, 左邻位<下邻位<起始位置>>> // 象眼
    ? 是
    : 否
  : 否

/**
 * 马需要遍历八个斜向“日”字的位置，并且判断马腿
 */
type 马可以去那里吗<
  起始位置 extends 棋子坐标,
  目标位置 extends 棋子坐标,
  当前棋局 extends 棋局
> = 是 extends 相同位置<左邻位<左邻位<上邻位<起始位置>>>, 目标位置> // 上偏左
  ? 是 extends 该位置没有棋子<当前棋局, 左邻位<起始位置>> // 马腿在起始位置正左一位
    ? 是
    : 否
  : 是 extends 相同位置<左邻位<上邻位<上邻位<起始位置>>>, 目标位置> // 左偏上
  ? 是 extends 该位置没有棋子<当前棋局, 上邻位<起始位置>> // 马腿在起始位置正上一位
    ? 是
    : 否
  : 是 extends 相同位置<右邻位<上邻位<上邻位<起始位置>>>, 目标位置> // 右偏上
  ? 是 extends 该位置没有棋子<当前棋局, 上邻位<起始位置>> // 马腿在起始位置正上一位
    ? 是
    : 否
  : 是 e


/*
                        ,{

                        	text: 'View SVG',
                        	onclick: function () {
                        		var svg = this.getSVG()
                        			.replace(/</g, '\n<')
                        			.replace(/>/g, '>');

                        		doc.body.innerHTML = '
' + svg + '
';
                        	}
                        } // */
                    ]
                }
            }
        };

        // Add the H.post utility
        H.post = function(url, data, formAttributes) {
            var name,
                form;

            // create the form
            form = createElement('form', merge({
                method: 'post',
                action: url,
                enctype: 'multipart/form-data'
            }, formAttributes), {
                display: 'none'
            }, doc.body);

            // add the data
            for (name in data) {
                createElement('input', {
                    type: 'hidden',
                    name: name,
                    value: data[name]
                }, null, form);
            }

            // submit
            form.submit();

            // clean up
            discardElement(form);
        };

        extend(Chart.prototype, {

            /**
             * A collection of fixes on the produced SVG to account for expando properties,
             * browser bugs, VML problems and other. Returns a cleaned SVG.
             */
            sanitizeSVG: function(svg, options) {
                // Move HTML into a foreignObject
                if (options && options.exporting && options.exporting.allowHTML) {
                    var html = svg.match(/<\/svg>(.*?$)/);
                    if (html) {
                        html = '<foreignObject x="0" y="0" ' +
                            'width="' + options.chart.width + '" ' +
                            'height="' + options.chart.height + '">' +
                            '' +
                            html[1] +
                            '' +
                            '</foreignObject>';
                        svg = svg.replace('</svg>', html + '</svg>');
                    }
                }

                svg = svg
                    .replace(/zIndex="[^"]+"/g, '')
                    .replace(/isShadow="[^"]+"/g, '')
                    .replace(/symbolName="[^"]+"/g, '')
                    .replace(/jQuery[0-9]+="[^"]+"/g, '')
                    .replace(/url\(("|")(\S+)("|")\)/g, 'url($2)')
                    .replace(/url\([^#]+#/g, 'url(#')
                    .replace(/<svg /, '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')
                    .replace(/ (NS[0-9]+\:)?href=/g, ' xlink:href=') // #3567
                    .replace(/\n/, ' ')
                    // Any HTML added to the container after the SVG (#894)
                    .replace(/<\/svg>.*?$/, '</svg>')
                    // Batik doesn't support rgba fills and strokes (#3095)
                    .replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g, '$1="rgb($2)" $1-opacity="$3"')
                    /* This fails in IE < 8
                    .replace(/([0-9]+)\.([0-9]+)/g, function(s1, s2, s3) { // round off to save weight
                    	return s2 +'.'+ s3[0];
                    })*/

                // Replace HTML entities, issue #347
                .replace(/ /g, '\u00A0') // no-break space
                    .replace(//g, '\u00AD'); // soft hyphen

                return svg;
            },

            /**
             * Return innerHTML of chart. Used as hook for plugins.
             */
            getChartHTML: function() {

                this.inlineStyles();

                return this.container.innerHTML;
            },

            /**
             * Return an SVG representation of the chart.
             *
             * @param additionalOptions {Object} Additional chart options for the
             *    generated SVG representation. For collections like `xAxis`, `yAxis` or
             *    `series`, the additional options is either merged in to the or


_base_ = [
    '../_base_/models/hrnet/hrnet-w64.py',
    '../_base_/datasets/imagenet_bs32_pil_resize.py',
    '../_base_/schedules/imagenet_bs256_coslr.py',
    '../_base_/default_runtime.py'
]

# NOTE: `auto_scale_lr` is for automatically scaling LR
# based on the actual training batch size.
# base_batch_size = (4 GPUs) x (32 samples per GPU)
auto_scale_lr = dict(base_batch_size=128)


	log.Trace("Getting headers in lightest sync mode", "from", from, "height", height, "nextEpochBlock", nextEpochBlock, "epoch", epoch)
		if nextEpochBlock < height {
			getEpochHeaders(nextEpochBlock)
			return true
		} else if from <= height {
			getHeaders(height)
			return true
		} else {
			// During repeated invocations, "from" can be more than height since the blocks could have
			// created after this method was invoked and in that case, the from which is one beyond the
			// last fetched header number can be more than the height.
			// If we have already fetched a block header >= height block header then we declare that the sync
			// is finished and stop.
			return false
		}
	}
	// TODO(ponti): Re add the "moving" pivot, after changing the way we calculate the uptimeScore
	// getNextPivot := func() {
	// 	pivoting = true
	// 	request = time.Now()

	// 	ttl = d.requestTTL()
	// 	timeout.Reset(ttl)

	// 	d.pivotLock.RLock()
	// 	pivot := d.pivotHeader.Number.Uint64()
	// 	d.pivotLock.RUnlock()

	// 	p.log.Trace("Fetching next pivot header", "number", pivot+fsMinFullBlocks)
	// 	go p.peer.RequestHeadersByNumber(pivot+fsMinFullBlocks, 2, int(fsMinFullBlocks-9), false) // move +64 when it's 2x64-8 deep
	// }
	// Start pulling the header chain skeleton until all is done
	ancestor := from

	if mode == LightestSync {
		if epoch == 0 {
			panic("Epoch cannot be 0 in IBFT + LightestSync")
		}
		// Don't fetch skeleton, only fetch the headers.
		skeleton = false
		getEpochOrNormalHeaders(from)
	} else {
		log.Trace("getHeaders#initialHeaderDownload", "from", from)
		getHeaders(from)
	}

	for {
		select {
		case <-d.cancelCh:
			return errCanceled

		case packet := <-d.headerCh:
			// Make sure the active peer is giving us the skeleton headers
			if packet.PeerId() != p.id {
				log.Debug("Received skeleton from incorrect peer", "peer", packet.PeerId())
				break
			}
			headerReqTimer.UpdateSince(request)
			timeout.Stop()

			// If the pivot is being checked, move if it became stale and run the real retrieval
			var pivot uint64

			d.pivotLock.RLock()
			if d.pivotHeader != nil {
				pivot = d.pivotHeader.Number.Uint64()
			}
			d.pivotLock.RUnlock()

			if pivoting {
				if packet.Items() == 2 {
					// Retrieve the headers and do some sanity checks, just in case
					headers := packet.(*headerPack).headers

					if have, want := headers[0].Number.Uint64(), pivot+fsMinFullBlocks; have != want {
						log.Warn("Peer sent invalid next pivot", "have", have, "want", want)
						return fmt.Errorf("%w: next pivot number %d != requested %d", errInvalidChain, have, want)
					}
					if have, want := headers[1].Number.Uint64(), pivot+2*fsMinFullBlocks-8; have != want {
						log.Warn("Peer sent invalid pivot confirmer", "have", have, "want", want)
						return fmt.Errorf("%w: next pivot confirmer number %d != requested %d", errInvalidChain, have, want)
					}
					log.Warn("Pivot seemingly stale, moving", "old", pivot, "new", headers[0].Number)
					pivot = headers[0].Number.Uint64()

					d.pivotLock.Lock()
					d.pivotHeader = headers[0]
					d.pivotLock.Unlock()

					// Write out the pivot into the database so a rollback beyond
					// it will reenable fast sync and update the state root that
					// the state syncer will be downloading.
					rawdb.WriteLastPivotNumber(d.stateDB, pivot)
				}
				pi


// Copyright (c) 2009-2025 Satoshi Nakamoto
// Copyright (c) 2009-2025 The Bitcoin Core developers
// Copyright (c) 2024-2025 The BitcoinII Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef BITCOINII_NETGROUP_H
#define BITCOINII_NETGROUP_H

#include <netaddress.h>
#include <uint256.h>

#include <vector>

/**
 * Netgroup manager
 */
class NetGroupManager {
public:
    explicit NetGroupManager(std::vector<bool> asmap)
        : m_asmap{std::move(asmap)}
    {}

    /** Get a checksum identifying the asmap being used. */
    uint256 GetAsmapChecksum() const;

    /**
     * Get the canonical identifier of the network group for address.
     *
     * The groups are assigned in a way where it should be costly for an attacker to
     * obtain addresses with many different group identifiers, even if it is cheap
     * to obtain addresses with the same identifier.
     *
     * @note No two connections will be attempted to addresses with the same network
     *       group.
     */
    std::vector<unsigned char> GetGroup(const CNetAddr& address) const;

    /**
     *  Get the autonomous system on the BGP path to address.
     *
     *  The ip->AS mapping depends on how asmap is constructed.
     */
    uint32_t GetMappedAS(const CNetAddr& address) const;

    /**
     *  Analyze and log current health of ASMap based buckets.
     */
    void ASMapHealthCheck(const std::vector<CNetAddr>& clearnet_addrs) const;

    /**
     *  Indicates whether ASMap is being used for clearnet bucketing.
     */
    bool UsingASMap() const;

private:
    /** Compressed IP->ASN mapping, loaded from a file when a node starts.
     *
     * This mapping is then used for bucketing nodes in Addrman and for
     * ensuring we connect to a diverse set of peers in Connman. The map is
     * empty if no file was provided.
     *
     * If asmap is provided, nodes will be bucketed by AS they belong to, in
     * order to make impossible for a node to connect to several nodes hosted
     * in a single AS. This is done in response to Erebus attack, but also to
     * generally diversify the connections every node creates, especially
     * useful when a large fraction of nodes operate under a couple of cloud
     * providers.
     *
     * If a new asmap is provided, the existing addrman records are
     * re-bucketed.
     *
     * This is initialized in the constructor, const, and therefore is
     * thread-safe. */
    const std::vector<bool> m_asmap;
};

#endif // BITCOINII_NETGROUP_H


ALID_HANDLE_VALUE; m_hStdErr=INVALID_HANDLE_VALUE;
	WaitNamedPipe(szStdOutPipe, NULL); WaitNamedPipe(szStdInPipe, NULL); WaitNamedPipe(szStdErrPipe, NULL);
	m_hStdOut=CreateFile(szStdOutPipe, GENERIC_READ, 0, &SecAttrib, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
	m_hStdIn=CreateFile(szStdInPipe, GENERIC_WRITE, 0, &SecAttrib, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
	m_hStdErr=CreateFile(szStdErrPipe, GENERIC_READ, 0, &SecAttrib, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);

	if(CreateProcess(NULL, command, NULL, NULL, true, NORMAL_PRIORITY_CLASS|CREATE_NO_WINDOW, NULL, NULL, &m_sinfo, &pinfo))
	{	m_hProcess=pinfo.hProcess; m_pStdOut=new CStdOut_Listen; m_pStdErr=new CStdOut_Listen;
		m_pStdOut->m_hStdOut=m_hStdOut; m_pStdOut->m_pMessage=&m_mMessage; m_pStdOut->Start(true, false, false);
		m_pStdErr->m_hStdOut=m_hStdErr; m_pStdOut->m_pMessage=&m_mMessage; m_pStdErr->Start(true, false, false); }
}

bool CCmdShell::HandleCommand(CMessage *pMsg)
{	if(!pMsg->sCmd.Compare("shell.enable")) {
		m_bEnabled=true; m_mMessage.sReplyTo=pMsg->sReplyTo;
		m_mMessage.bSilent=pMsg->bSilent; m_mMessage.bNotice=pMsg->bNotice;
		m_mMessage.bOutchan=pMsg->bOutchan; return true; }
	else if(!pMsg->sCmd.Compare("shell.disable")) {
		m_bEnabled=false; m_mMessage.sReplyTo.Assign("");
		m_mMessage.bSilent=true; m_mMessage.bNotice=false;
		m_mMessage.bOutchan=false; return true; }
	else if(m_bEnabled) {
		// FallBack handler starts here
		DWORD dwWritten; CString sBuffer; sBuffer.Format("%s\n", pMsg->sChatString.CStr());
		WriteFile(m_hStdIn, sBuffer.CStr(), (DWORD)sBuffer.GetLength(), &dwWritten, NULL);
	}

	return false; }

#endif // _WIN32
#include "main.h"
#include "bot.h"
#include "mainctrl.h"
#include "smtp_logic.h"
#include "utility.h"

#include "config.h"

char *g_szSectionName=SECTION_NAME;

list<scriptcmd> g_lScriptCmds;

bool ParseScript(const char *szScript) {
	CString sScript(szScript); bool bGetScript=false; unsigned long lScriptType;
	int iLineNum=0; CString sCurLine=sScript.Token(iLineNum, "\n");
	while(sCurLine.Compare("")) {
		if(sCurLine.GetLength()) if(!bGetScript) {
			if(!sCurLine.Token(0, " ").CompareNoCase("onstart")) {
				// If there is no { after the script name, dont parse
				if(!sCurLine.Token(1, " ").Compare("{")) {
					bGetScript=true; lScriptType=SCRIPT_ONSTART;
				}
			} else if(!sCurLine.Token(0, " ").CompareNoCase("onconnect")) {
				if(!sCurLine.Token(1, " ").Compare("{")) {
					bGetScript=true; lScriptType=SCRIPT_ONCONNECT;