    stack_ptr++;
        }
      /* Climb up again.  */
      for (;;)
        {
          if (stack_ptr == &stack[0])
            goto done_iterate;
          stack_ptr--;
          node = stack_ptr->node;
          if (!stack_ptr->rightp)
            break;
          /* Free the current node.  */
          if (set->base.dispose_fn != NULL)
            set->base.dispose_fn (node->value);
          free (node);
        }
      /* Descend on right branch.  */
      stack_ptr->rightp = true;
      node = node->right;
      stack_ptr++;
    }
 done_iterate:
  free (set);
}

/* --------------------- gl_oset_iterator_t Data Type --------------------- */

static gl_oset_iterator_t _GL_ATTRIBUTE_PURE
gl_tree_iterator (gl_oset_t set)
{
  gl_oset_iterator_t result;
  gl_oset_node_t node;

  result.vtable = set->base.vtable;
  result.set = set;
  /* Start node is the leftmost node.  */
  node = set->root;
  if (node != NULL)
    while (node->left != NULL)
      node = node->left;
  result.p = node;
  /* End point is past the rightmost node.  */
  result.q = NULL;
#if defined GCC_LINT || defined lint
  result.i = 0;
  result.j = 0;
  result.count = 0;
#endif

  return result;
}

static gl_oset_iterator_t
gl_tree_iterator_atleast (gl_oset_t set,
                          gl_setelement_threshold_fn threshold_fn,
                          const void *threshold)
{
  gl_oset_iterator_t result;
  gl_oset_node_t node;

  result.vtable = set->base.vtable;
  result.set = set;
  /* End point is past the rightmost node.  */
  result.q = NULL;
#if defined GCC_LINT || defined lint
  result.i = 0;
  result.j = 0;
  result.count = 0;
#endif

  for (node = set->root; node != NULL; )
    {
      if (! threshold_fn (node->value, threshold))
        node = node->right;
      else
        {
          /* We have an element >= THRESHOLD.  But we need the leftmost such
             element.  */
          gl_oset_node_t found = node;
          node = node->left;
          for (; node != NULL; )
            {
              if (! threshold_fn (node->value, threshold))
                node = node->right;
              else
                {
                  found = node;
                  node = node->left;
                }
            }
          result.p = found;
          return result;
        }
    }
  result.p = NULL;
  return result;
}

static bool
gl_tree_iterator_next (gl_oset_iterator_t *iterator, const void **eltp)
{
  if (iterator->p != iterator->q)
    {
      gl_oset_node_t node = (gl_oset_node_t) iterator->p;
      *eltp = node->value;
      /* Advance to the next node.  */
      node = gl_tree_next_node (node);
      iterator->p = node;
      return true;
    }
  else
    return false;
}

static void
gl_tree_iterator_free (_GL_ATTRIBUTE_MAYBE_UNUSED gl_oset_iterator_t *iterator)
{
}


, 0x4b, 0x45, 0x20, 0x9b, 0x9d, 0xa7, 0x9f, 0xe1, 0x5b, 0x19, 0xf8,
            0x4f, 0xd1, 0x35, 0xd8, 0x41, 0xe2, 0xd8, 0xf9, 0xa8, 0x6a,
        ],
    },
    // KAT 226
    KV {
        k: &[0x13],
        y: &[
            0x01, 0x37, 0xd5, 0xda, 0x06, 0x26, 0xa0, 0x21, 0xed, 0x5c, 0xc3, 0x94, 0x24, 0x97,
            0x53, 0x5b, 0x24, 0x5d, 0x67, 0xd2, 0x8a, 0xee, 0x2b, 0x7b, 0xcf, 0x4a, 0xcc, 0x50,
            0xee, 0xe3, 0x65, 0x45, 0x77, 0x27, 0x73, 0xad, 0x96, 0x3f, 0xf2, 0xeb, 0x8c, 0xf9,
            0xb0, 0xec, 0x39, 0x99, 0x16, 0x31, 0xc3, 0x77, 0xf5, 0xa4, 0xd8, 0x9e, 0xa9, 0xfb,
            0xfe, 0x44, 0xa9, 0x09, 0x1a, 0x69, 0x5b, 0xfd, 0x05, 0x75,
        ],
        x: &[
            0x00, 0x99, 0x8d, 0xcc, 0xe4, 0x86, 0x41, 0x9c, 0x34, 0x87, 0xc0, 0xf9, 0x48, 0xc2,
            0xd5, 0xa1, 0xa0, 0x72, 0x45, 0xb7, 0x7e, 0x07, 0x55, 0xdf, 0x54, 0x7e, 0xff, 0xf0,
            0xac, 0xdb, 0x37, 0x90, 0xe7, 0xf1, 0xfa, 0x3b, 0x30, 0x96, 0x36, 0x26, 0x69, 0x67,
            0x92, 0x32, 0x55, 0x7d, 0x7a, 0x45, 0x97, 0x0d, 0xfe, 0xcf, 0x43, 0x1e, 0x72, 0x5b,
            0xbd, 0xe4, 0x78, 0xff, 0x0b, 0x24, 0x18, 0xd6, 0xa1, 0x9b,
        ],
    },
    // KAT 227
    KV {
        k: &[0x14],
        x: &[
            0x01, 0x8b, 0xdd, 0x7f, 0x1b, 0x88, 0x95, 0x98, 0xa4, 0x65, 0x3d, 0xee, 0xae, 0x39,
            0xcc, 0x6f, 0x8c, 0xc2, 0xbd, 0x76, 0x7c, 0x2a, 0xb0, 0xd9, 0x3f, 0xb1, 0x2e, 0x96,
            0x8f, 0xbe, 0xd3, 0x42, 0xb5, 0x17, 0x09, 0x50, 0x63, 0x39, 0xcb, 0x10, 0x49, 0xcb,
            0x11, 0xdd, 0x48, 0xb9, 0xbd, 0xb3, 0xcd, 0x5c, 0xad, 0x79, 0x2e, 0x43, 0xb7, 0x4e,
            0x16, 0xd8, 0xe2, 0x60, 0


layer_one.friend.nested_hash.k0 = 0
  args.state.player_one.friend.nested_hash.k1 = 1
  args.state.player_one.friend.nested_hash.k2 = 2
  args.state.player_one.friend.nested_hash.k3 = 3
  args.state.player_one.friend.nested_hash.k4 = 4
  args.state.player_one.friend.nested_hash.k5 = 5
  args.state.player_one.friend.nested_hash.k6 = 6
  args.state.player_one.friend.nested_hash.k7 = 7
  args.state.player_one.friend.nested_hash.k8 = 8
  args.state.player_one.friend.nested_hash.k9 = 9
  string = state_to_string args.state
  state = state_from_string string
end

Unit Tests - suggest_autocompletion_tests.rb link

# ./samples/10_advanced_debugging/03_unit_tests/suggest_autocompletion_tests.rb
def default_suggest_autocompletion args
  {
    index: 4,
    text: "args.",
    __meta__: {
      other_options: [
        {
          index: Fixnum,
          file: "app/main.rb"
        }
      ]
    }
  }
end

def assert_completion source, *expected
  results = suggest_autocompletion text:  (source.strip.gsub  ":cursor", ""),
                                   index: (source.strip.index ":cursor")

  puts results
end

def test_args_completion args, assert
  $gtk.write_file_root "autocomplete.txt", ($gtk.suggest_autocompletion text: <<-S, index: 128).join("\n")
require 'app/game.rb'

def tick args
  args.gtk.suppress_mailbox = false
  $game ||= Game.new
  $game.args = args
  $game.args.
  $game.tick
end
S

  puts "contents:"
  puts ($gtk.read_file "autocomplete.txt")
end

Http link

Retrieve Images - main.rb link

# ./samples/11_http/01_retrieve_images/app/main.rb
$gtk.register_cvar 'app.warn_seconds', "seconds to wait before starting", :uint, 11

def tick args
  args.outputs.background_color = [0, 0, 0]

  # Show a warning at the start.
  args.state.warning_debounce ||= args.cvars['app.warn_seconds'].value * 60
  if args.state.warning_debounce > 0
    args.state.warning_debounce -= 1
    args.outputs.labels << [640, 600, "This app shows random images from the Internet.", 10, 1, 255, 255, 255]
    args.outputs.labels << [640, 500, "Quit in the next few seconds if this is a problem.", 10, 1, 255, 255, 255]
    args.outputs.labels << [640, 350, "#{(args.state.warning_debounce / 60.0).to_i}", 10, 1, 255, 255, 255]
    return
  end

  args.state.download_debounce ||= 0   # start immediately, reset to non zero later.
  args.state.photos ||= []

  # Put a little pause between each download.
  if args.state


704356798070e+308
	SmallestNonzeroFloat64 = 0x1p-1022 * 0x1p-52            // 4.9406564584124654417656879286822137236505980e-324
)

// Integer limit values.
const (
	intSize = 32 << (^uint(0) >> 63) // 32 or 64

	MaxInt    = 1<<(intSize-1) - 1
	MinInt    = -1 << (intSize - 1)
	MaxInt8   = 1<<7 - 1
	MinInt8   = -1 << 7
	MaxInt16  = 1<<15 - 1
	MinInt16  = -1 << 15
	MaxInt32  = 1<<31 - 1
	MinInt32  = -1 << 31
	MaxInt64  = 1<<63 - 1
	MinInt64  = -1 << 63
	MaxUint   = 1<<intSize - 1
	MaxUint8  = 1<<8 - 1
	MaxUint16 = 1<<16 - 1
	MaxUint32 = 1<<32 - 1
	MaxUint64 = 1<<64 - 1
)
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package math

/*
	Floating-point arcsine and arccosine.

	They are implemented by computing the arctangent
	after appropriate range reduction.
*/

// Asin returns the arcsine, in radians, of x.
//
// Special cases are:
//
//	Asin(±0) = ±0
//	Asin(x) = NaN if x < -1 or x > 1
func Asin(x float64) float64 {
	if haveArchAsin {
		return archAsin(x)
	}
	return asin(x)
}

func asin(x float64) float64 {
	if x == 0 {
		return x // special case
	}
	sign := false
	if x < 0 {
		x = -x
		sign = true
	}
	if x > 1 {
		return NaN() // special case
	}

	temp := Sqrt(1 - x*x)
	if x > 0.7 {
		temp = Pi/2 - satan(temp/x)
	} else {
		temp = satan(x / temp)
	}

	if sign {
		temp = -temp
	}
	return temp
}

// Acos returns the arccosine, in radians, of x.
//
// Special case is:
//
//	Acos(x) = NaN if x < -1 or x > 1
func Acos(x float64) float64 {
	if haveArchAcos {
		return archAcos(x)
	}
	return acos(x)
}

func acos(x float64) float64 {
	return Pi/2 - Asin(x)
}
// Code generated by gen_sort_variants.go; DO NOT EDIT.

// Copyright 2022 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package sort

// insertionSort_func sorts data[a:b] using insertion sort.
func insertionSort_func(data lessSwap, a, b int) {
	for i := a + 1; i < b; i++ {
		for j := i; j > a && data.Less(j, j-1); j-- {
			data.Swap(j, j-1)
		}
	}
}

// siftDown_func implements the heap property on data[lo:hi].
// first is an offset into the array where the root of the heap lies.
func siftDown_func(data lessSwap, lo, hi, first int) {
	root := lo
	for {
		child := 2*root + 1
		if child >= hi {


 withContext(Dispatchers.IO) {
            cache.put(key, value)
        }
    }

    suspend fun putJson(key: String, json: Any) {
        withContext(Dispatchers.IO) {
            cache.put(key, GsonUtils.toJson(json))
        }
    }

    suspend fun remove(key: String) {
        withContext(Dispatchers.IO) {
            cache.remove(key)
        }
    }

    suspend fun clear() {
        withContext(Dispatchers.IO) {
            cache.clear()
        }
    }

    companion object {
        val userCache by lazy {
            NetCache("net/user")
        }
        val globalCache by lazy {
            NetCache("net/global")
        }
    }
}package me.wcy.music.common

import android.content.res.Configuration
import androidx.appcompat.app.AppCompatDelegate
import com.blankj.utilcode.util.ActivityUtils
import me.wcy.music.storage.preference.ConfigPreferences
import javax.inject.Inject
import javax.inject.Singleton

@Singleton
class DarkModeService @Inject constructor() {

    fun init() {
        setDarkModeInternal(DarkMode.fromValue(ConfigPreferences.darkMode))
    }

    fun setDarkMode(mode: DarkMode) {
        if (mode.value != ConfigPreferences.darkMode) {
            ConfigPreferences.darkMode = mode.value
            setDarkModeInternal(mode)
        }
    }

    private fun setDarkModeInternal(mode: DarkMode) {
        AppCompatDelegate.setDefaultNightMode(mode.systemValue)
    }

    fun isDarkMode(): Boolean {
        val context = ActivityUtils.getTopActivity() ?: return false
        val nightModeFlags =
            context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
        when (nightModeFlags) {
            Configuration.UI_MODE_NIGHT_NO -> {
                return false
            }

            Configuration.UI_MODE_NIGHT_YES -> {
                return true
            }
        }
        return false
    }

    sealed class DarkMode(val value: String, val systemValue: Int) {
        object Auto : DarkMode("0", AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM)
        object Light : DarkMode("1", AppCompatDelegate.MODE_NIGHT_NO)
        object Dark : DarkMode("2", AppCompatDelegate.MODE_NIGHT_YES)

        override fun hashCode(): Int {
            return value.hashCode()
        }

        override fun equals(other: Any?): Boolean {
            return other is DarkMode && other.value == this.value
        }

        companion object {
            fun fromValue(value: String): DarkMode {
                return when (value) {
                    "1" -> Light
                    "2" -> Dark
                    else -> Auto
                }
            }
        }
    }
}package me.wcy.music.search

import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.launch
import top.wangchenyan.common.ext.toUnMutable
import me.wcy.music.consts.Consts

/**
 * Created by wangchenyan.top on 2023/9/20.
 */
class SearchViewModel : ViewModel() {
    private val _keywords = MutableStateFlow("")
    val keywords = _keywords.toUnMutable()

    private val _historyKeywords = MutableStateFlow(SearchPreference.historyKeywords ?: emptyList())
    val historyKeywords = _historyKeywords.toUnMutable()

    private val _showResult = MutableStateFlow(false)
    val showResult = _showResult.to


            } else {
              Oi_Fs_Tt_Mt_oprops.push(oprop);
            }
          } else {
            if oprop.missing_values.len() == 0 {
              Oi_Fs_Tf_Mf_oprops.push(oprop);
            } else {
              Oi_Fs_Tf_Mt_oprops.push(oprop);
            }
          }
        } else {
          // Fm
          if oprop.is_target_optional {
            // Tt
            if oprop.missing_values.len() == 0 {
              Oi_Fm_Tt_Mf_oprops.push(oprop);
            } else {
              Oi_Fm_Tt_Mt_oprops.push(oprop);
            }
          } else {
            if oprop.missing_values.len() == 0 {
              Oi_Fm_Tf_Mf_oprops.push(oprop);
            } else {
              Oi_Fm_Tf_Mt_oprops.push(oprop);
            }
          }
        }
      }
    }
  };

  (
    Ob_Fs_Tt_oprops, Ob_Fs_Tf_oprops, Ob_Fm_Tt_oprops, Ob_Fm_Tf_oprops,
    Oi_Fs_Tt_Mt_oprops, Oi_Fs_Tf_Mt_oprops, Oi_Fm_Tt_Mt_oprops, Oi_Fm_Tf_Mt_oprops,
    Oi_Fs_Tt_Mf_oprops, Oi_Fs_Tf_Mf_oprops, Oi_Fm_Tt_Mf_oprops, Oi_Fm_Tf_Mf_oprops
  )
}

#[inline]
fn get_dalign_and_index<'a>(readers: &'a [Box<dyn RAReader + 'a>], desc: &Description, dprops: &Vec<&DataProp>) -> (Vec<Box<dyn SAlignmentFunc + 'a>>, Vec<Vec<Index>>) {
  let dprop_aligns = dprops.iter()
    .map(|a| build_align_func(&readers, desc, &a.alignments).into_single())
    .collect::<Vec<_>>();
  let dprop_indices = dprops.iter()
    .map(|p| p.attribute.path.get_initial_step(readers[p.attribute.resource_id].as_ref()))
    .collect::<Vec<_>>();

  (dprop_aligns, dprop_indices)
}

#[inline]
fn get_Ob_Fs_align_and_index<'a>(readers: &'a [Box<dyn RAReader + 'a>], desc: &Description, oprops: &Vec<&BlankObject>) -> (Vec<Box<dyn SAlignmentFunc + 'a>>, Vec<Vec<Index>>) {
  let oprop_aligns = oprops.iter()
    .map(|a| build_align_func(&readers, desc, &a.alignments).into_single())
    .collect::<Vec<_>>();
  let oprop_indices = oprops.iter()
    .map(|p| p.attribute.path.get_initial_step(readers[p.attribute.resource_id].as_ref()))
    .collect::<Vec<_>>();

  (oprop_aligns, oprop_indices)
}

#[inline]
fn get_Ob_Fm_align_and_index<'a>(readers: &'a [Box<dyn RAReader + 'a>], desc: &Description, oprops: &Vec<&BlankObject>) -> (Vec<Box<dyn MAlignmentFunc + 'a>>, Vec<Vec<Index>>) {
  let oprop_aligns = oprops.iter()
    .map(|a| build_align_func(&readers, desc, &a.alignments).into_multiple())
    .collect::<Vec<_>>();
  let oprop_indices = oprops.iter()
    .map(|p| p.attribute.path.get_initial_step(readers[p.attribute.resource_id].as_ref()))
    .collect::<Vec<_>>();

  (oprop_aligns, oprop_indices)
}

#[inline]
fn get_Oi_Fs_align_and_index<'a>(readers: &'a


406: LDSB_R	ldsb	[%r22 + %r0], %r30
T0_hwint_854:
!$EV trig_pc_d(0,expr(@VA(.MAIN.T0_hwint_854), 16, 16)) -> intp(0, 0, 2f)
	.word 0xbe0d4000  ! 6408: AND_R	and 	%r21, %r0, %r31
	.word 0xfda5e0bc  ! 6409: STFA_I	sta	%f30, [0x00bc, %r23]
	.word 0xb224e18c  ! 6410: SUB_I	sub 	%r19, 0x018c, %r25
	.word 0xf435e08c  ! 6411: STH_I	sth	%r26, [%r23 + 0x008c]
	.word 0xfac51c40  ! 6413: LDSWA_R	ldswa	[%r20, %r0] 0xe2, %r29
	.word 0xfc1c20e9  ! 6414: LDD_I	ldd	[%r16 + 0x00e9], %r30
	.word 0xf51c0000  ! 6415: LDDF_R	ldd	[%r16, %r0], %f26
	.word 0xfecc5480  ! 6416: LDSBA_R	ldsba	[%r17, %r0] 0xa4, %r31
T0_irf_ce_519:
!$EV error(0,expr(@VA(.MAIN.T0_irf_ce_519), 16, 16),1,IRF,ce,33,15, x,x,x, x,x,x)
	.word 0xfe450000  ! 6418: LDSW_R	ldsw	[%r20 + %r0], %r31
	.word 0xbb2c5000  ! 6419: SLLX_R	sllx	%r17, %r0, %r29
T0_hwint_855:
!$EV trig_pc_d(0,expr(@VA(.MAIN.T0_hwint_855), 16, 16)) -> intp(0, 0, 38)
	.word 0xb4bdc000  ! 6421: XNORcc_R	xnorcc 	%r23, %r0, %r26
	.word 0xb2158000  ! 6422: OR_R	or 	%r22, %r0, %r25
	.word 0xb2852182  ! 6423: ADDcc_I	addcc 	%r20, 0x0182, %r25
T0_irf_ce_520:
!$EV error(0,expr(@VA(.MAIN.T0_irf_ce_520), 16, 16),1,IRF,ce,56,31, x,x,x, x,x,x)
	.word 0xbf7de401  ! 6426: MOVR_I	movre	%r23, 0x1, %r31
	.word 0xf9bde1c3  ! 6427: STDFA_I	stda	%f28, [0x01c3, %r23]
	.word 0xffb5a1e6  ! 6428: STQFA_I	-	%f31, [0x01e6, %r22]
	.word 0xfc140000  ! 6429: LDUH_R	lduh	[%r16 + %r0], %r30
	.word 0xb4948000  ! 6430: ORcc_R	orcc 	%r18, %r0, %r26
	.word 0xbb7d8400  ! 6432: MOVR_R	movre	%r22, %r0, %r29
	.word 0xffbca0d9  ! 6434: STDFA_I	stda	%f31, [0x00d9, %r18]
	.word 0xf7b5c920  ! 6436: STQFA_R	-	%f27, [%r0, %r


	DisplayName: "Group Foo",
			Members:     []*Member{},
		}

		got, err := service.CreateOrGetGroup(context.Background(), grpr)
		assert.NoError(t, err)
		assert.NotNil(t, got)

		assert.Equal(t, "90677c608a-ef9cb2da-d480-422b-9901-451b1bf9e607", got.ID)
		assert.Equal(t, "Group Foo", got.DisplayName)
	})
}

func TestPatchGroup(t *testing.T) {
	mockCtrl := gomock.NewController(t)
	defer mockCtrl.Finish()
	endpoint := "https://testing.com"

	t.Run("should return an error when usr is nil", func(t *testing.T) {
		mockHTTPClient := mocks.NewMockHTTPClient(mockCtrl)

		service, err := NewSCIMService(mockHTTPClient, endpoint, "MyToken")
		assert.NoError(t, err)
		assert.NotNil(t, service)

		err = service.PatchGroup(context.Background(), nil)
		assert.Error(t, err)
	})

	t.Run("should return a valid response with a valid request", func(t *testing.T) {
		mockHTTPClient := mocks.NewMockHTTPClient(mockCtrl)

		httpResp := &http.Response{
			Status:     "204 OK",
			StatusCode: http.StatusCreated,
			Header: http.Header{
				"Date":             []string{"Tue, 07 Apr 2020 23:59:09 GMT"},
				"Content-Type":     []string{"application/json"},
				"x-amzn-RequestId": []string{"dad0c91c-1ea8-4b36-9fdb-4f099b59c1c9"},
			},
			Proto:         "HTTP/1.1",
			Body:          io.NopCloser(strings.NewReader("")),
			ContentLength: int64(len("")),
		}

		mockHTTPClient.EXPECT().Do(gomock.Any()).Return(httpResp, nil)

		service, err := NewSCIMService(mockHTTPClient, endpoint, "MyToken")
		assert.NoError(t, err)
		assert.NotNil(t, service)

		pur := &PatchGroupRequest{
			Group: Group{
				ID: "9067729b3d-94f1e0b3-c394-48d5-8ab1-2c122a167074",
			},
			Patch: Patch{
				Schemas: []string{"urn:ietf:params:scim:api:messages:2.0:PatchOp"},
				Operations: []*Operation{
					{
						OP:    "replace",
						Value: struct{ DisplayName string }{"Group Foo"},
					},
				},
			},
		}

		err = service.PatchGroup(context.Background(), pur)
		assert.NoError(t, err)
	})

	t.Run("should return an error when group.ID is empty", func(t *testing.T) {
		mockHTTPClient := mocks.NewMockHTTPClient(mockCtrl)

		service, err := NewSCIMService(mockHTTPClient, endpoint, "MyToken")
		assert.NoError(t, err)
		assert.NotNil(t, service)

		pur := &PatchGroupRequest{
			Group: Group{},
			Patch: Patch{
				Schemas: []string{"urn:ietf:params:scim:api:messages:2.0:PatchOp"},
				Operations: []*Operation{
					{
						OP:    "replace",
						Value: struct{ DisplayName string }{""},
					},
				},
			},
		}

		err = service.PatchGroup(context.Background(), pur)
		assert.Error(t, err)
	})
}

func TestListGroups(t *testing.T) {
	mockCtrl := gomock.NewController(t)
	defer mockCtrl.Finish()
	endpoint := "https://testing.com"
	reqURL, err := url.Parse(endpoint)
	assert.NoError(t, err)

	ListUserResponseFile := "testdata/ListGroupsResponse.json


row_button:hover {
  opacity: 1;
}

.zA td.apU.xY span.inboxsdk__thread_row_button::before {
  /* Google adds in a pseduo ::before element to span elems with the T-KT class applied.
  Explicity setting this width and height to zero as remove weird positioning that results */
  width: 0px;
  height: 0px;
}

.inboxsdk__thread_row_attachment_icon {
  vertical-align: middle;
}

.zA > .xY.inboxsdk__thread_row_attachment_icons_present {
  max-width: inherit;
}

/* narrow vertical preview pane */
.Zs .xY.inboxsdk__thread_row_attachment_icons_present {
  flex-grow: 0;
}

.Zs .xY.inboxsdk__thread_row_label {
  order: 1;
}

.Zs .xY.inboxsdk__thread_row_icon_wrapper {
  order: 1;
  margin-left: 3px;
  margin-right: 0px;
}

/* end narrow vertical preview pane */

.inboxsdk__thread_row_icon_wrapper .inboxsdk__button_icon,
.inboxsdk__thread_row_icon_wrapper .inboxsdk__button_iconImg {
  height: 18px;
  width: 18px;
}

/* stylelint-disable-next-line no-duplicate-selectors */
.inboxsdk__thread_row_icon_wrapper {
  width: 20px;
  margin-right: 3px;
  align-self: center;
  height: 20px;
  flex: 0 0 auto;
}

/* stylelint-disable-next-line no-duplicate-selectors */
.inboxsdk__thread_row_icon_wrapper .inboxsdk__button_iconImg {
  vertical-align: top;
}

.inboxsdk__thread_row_image_added
  .y6
  .inboxsdk__thread_row_icon_wrapper
  ~ span[id] {
  margin-left: 3px;
}

.inboxsdk__thread_row_image_added .a4W,
.inboxsdk__thread_row_image_added .apA,
.inboxsdk__thread_row_image_added .apx {
  position: relative;
}

/* end thread rows */
[inboxsdk__message_added_attachment_icon] td.gH > span:first-child > img,
[inboxsdk__message_added_attachment_icon]
  td.gH
  div.gK
  > span:first-child
  > img {
  margin-right: 3px;
  margin-left: 3px;
  margin-top: 0px;
}

[inboxsdk__message_added_attachment_icon]
  td.gH
  > span:first-child
  > *:last-child,
[inboxsdk__message_added_attachment_icon]
  td.gH
  div.gK
  > span:first-child
  > *:last-child {
  margin-right: 6px;
}

.inboxsdk__message_attachment_iconWrapper,
.inboxsdk__message_attachment_icon {
  width: 21px;
  height: 21px;
  position: relative;
}

.inboxsdk__message_attachment_iconWrapper {
  margin: auto 3px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  vertical-align: top;
}

.inboxsdk__message_attachment_tooltipWrapper {
  position: absolute;
  top: 19px;
  z-index: 10;
}

/* Work around issue where clicking "Remove formatting" in Compose causes this
 * element to become taller and shift the toolbar down. */
.gU .aWQ {
  max-height: 3px;
}

.aQw .inboxsdk__button_icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  hei


qRx
	+prStr : !text "wLogSqRy=",0
	+prWord wLogSqRy
	+crout
	+prStr : !text "wSqDist=",0
	+prWord wSqDist
	+prStr : !text "wLogDist=",0
	+prWord wLogDist
	+crout
	+prStr : !text "wLogSize=",0
	+prWord wLogSize
	+prStr : !text "wSize=",0
	+prWord wSize
	+crout
	+prStr : !text "wSpriteTop=",0
	+prWord wSpriteTop
	+crout
	rts
.debug5 +prStr : !text "wX=",0
	+prXY
	rts
.debug6 +prStr : !text "wSpriteLeft=",0
	+prWord wSpriteLeft
	+crout
	rts
.debug7	+prStr : !text "txColumn=",0
	+prByte txColumn
	+prStr : !text "wTxColBump=",0
	+prWord wTxColBump
	+prStr : !text "depth=",0
	+prByte depth
	+crout
	rts
}

;------------------------------------------------------------------------------
; Draw sprite on screen. Uses all the variables output by spriteCalc.
drawSprite: !zone
	lda screenCol		; save screen column that main raycaster is doing
	pha
	lda wSpriteLeft		; lo byte of left coord
	ldx wSpriteLeft+1	; hi byte
	bpl +			; if positive, ok
	lda #0			; if negative, clamp left coord to 0
+	sta screenCol
	lda #$80		; fractional byte of txColumn
	pha
.lup	ldx screenCol
	cpx #NUM_COLS
	bcs .done
	inc spriteCtBuf,x	; count sprites in this column
	lda spriteCtBuf,x	; and check it
	cmp #SPRITE_CT_LIMIT	; limit to 4 sprites per column
	bcs .skip
	ldy lineCt		; column height
	lda depth		; depth index
	jsr saveLink		; save height and depth, link in to column data
	lda txColumn		; also save the column number
	sta txColBuf,x
.skip	inc screenCol		; next column on screen
	pla			; fractional byte
	clc
	adc wTxColBump		; advance lo byte
	pha
	lda txColumn		; integer part
	adc wTxColBump+1	; advance integer part
	sta txColumn		; and save it
	bcc .lup		; back for more
.done	pla			; discard fractional byte
	pla			; get back ray caster's screen column
	sta screenCol
	rts

;------------------------------------------------------------------------------
; Save a link in the linked column data, sorted according to its depth.
;
; Note: 	Does *not* fill in txColBuf,x on the assumption that the column
;       	number needs further computation after this function returns.
;		Store it in txColBuf,x when it's ready.
;
; Input: 	screenCol: horizontal screen column position
;		Y-reg: column height
;		A-reg: depth index
;		txNum: texture number
;
; Output:	X-reg: index into the link buffers at which data was saved
;		(can be used for further manipulation of the values there).
;
saveLink: !zone
	sta tmp


69394178937454662](https://t.bilibili.com/1069394178937454662) |
| RICH_TEXT_NODE_TYPE_CV | 专栏 | | | |
| RICH_TEXT_NODE_TYPE_VIEW_PICTURE | 查看图片 | | | [1069394178937454662](https://t.bilibili.com/1069394178937454662) |
| RICH_TEXT_NODE_TYPE_WEB | 网页链接 | | | [716751027361022055](https://t.bilibili.com/716751027361022055) |
| RICH_TEXT_NODE_TYPE_TAOBAO | | | | |
| RICH_TEXT_NODE_TYPE_MAIL | 邮箱地址 | | | ~~721314095109767220~~ |
| RICH_TEXT_NODE_TYPE_OGV_SEASON | 剧集信息 | | | ~~721282046064853080~~ |
| RICH_TEXT_NODE_TYPE_OGV_EP | | | | |

## 富文本节点对象

### RICH_TEXT_NODE_TYPE_TEXT

根对象:

| 字段 | 类型 | 内容 | 备注 |
| ---- | ---- | ---- | ---- |
| orig_text | string | 原始文本 |  |
| text | string | 显示文本 | 一般与 `orig_text` 内容相同 |
| type | string | `RICH_TEXT_NODE_TYPE_TEXT` |  |

**示例:**

查看示例:

```json
{
  "orig_text": "【洛天依·共鸣宝石收藏家】设定也分享给大家~！",
  "text": "【洛天依·共鸣宝石收藏家】设定也分享给大家~！",
  "type": "RICH_TEXT_NODE_TYPE_TEXT"
}
```

### RICH_TEXT_NODE_TYPE_AT

根对象:

| 字段 | 类型 | 内容 | 备注 |
| ---- | ---- | ---- | ---- |
| orig_text | string | 原始文本 |  |
| rid | string | 用户 mid (UID) |  |
| text | string | 显示文本 | 一般与 `orig_text` 内容相同 |
| type | string | `RICH_TEXT_NODE_TYPE_AT` |  |

**示例:**

查看示例:

```json
{
  "orig_text": "@wuziqian211 ",
  "rid": "425503913",
  "text": "@wuziqian211 ",
  "type": "RICH_TEXT_NODE_TYPE_AT"
}
```

### RICH_TEXT_NODE_TYPE_LOTTERY

根对象:

| 字段 | 类型 | 内容 | 备注 |
| ---- | ---- | ---- | ---- |
| orig_text | string | 原始文本 | 一般为 `互动抽奖` |
| rid | string | 抽奖 id |  |
| text | string | 显示文本 | 一般为 `互动抽奖` |
| type | string | `RICH_TEXT_NODE_TYPE_LOTTERY` |  |

**示例:**

查看示例:

```json
{
  "orig_text": "互动抽奖",
  "rid": "116067",
  "text": "互动抽奖",
  "type": "RICH_TEXT_NODE_TYPE_


 "Move focus to the lower window" })
vim.keymap.set("n", "<C-up>", "<C-w><C-k>", { desc = "Move focus to the upper window" })

-- Comment
vim.keymap.set("n", "<C-/>", "gcc", { desc = "toggle comment", remap = true })
vim.keymap.set("v", "<C-/>", "gc", { desc = "toggle comment", remap = true })

-- Tabbing
vim.keymap.set("v", "<", "<gv", opts)
vim.keymap.set("v", ">", ">gv", opts)

-- Move line up/down
vim.keymap.set("v", "<S-up>", ":m '<-2<CR>gv=gv", { desc = "Move line down in visual mode" })
vim.keymap.set("v", "<S-down>", ":m '>+1<CR>gv=gv", { desc = "Move line up in visual mode" })


 STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

package com.google.protobuf.kotlin

import com.google.common.testing.EqualsTester
import com.google.common.truth.Truth.assertThat
import kotlin.test.assertFailsWith
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4

/** Tests for [DslList]. */
@RunWith(JUnit4::class)
@OptIn(OnlyForUseByGeneratedProtoCode::class)
class DslListTest {
  class DummyProxy private constructor() : DslProxy()

  @Test
  fun matchesList() {
    assertThat(DslList<Int, DummyProxy>(listOf(1, 2, 3))).containsExactly(1, 2, 3).inOrder()
  }

  @Test
  fun reflectsChangesInList() {
    val mutableList = mutableListOf(1, 2, 3)
    val dslList = DslList<Int, DummyProxy>(mutableList)
    mutableList.add(4)
    assertThat(dslList).containsExactly(1, 2, 3, 4).inOrder()
  }

  @Test
  fun dslListIsNotMutable() {
    val dslList = DslList<Int, DummyProxy>(mutableListOf(1, 2, 3))
    assertThat(dslList is MutableList<*>).isFalse()
  }

  @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN", "UNCHECKED_CAST")
  @Test
  fun dslListIsNotEvenSecretlyMutable() {
    val dslList = DslList<Int, DummyProxy>(mutableListOf(1, 2, 3))
    val dslListAsJavaUtil = dslList as java.util.List<Int>
    assertFailsWith<UnsupportedOperationException> {
      dslListAsJavaUtil.add(4)
    }
  }

  @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN", "UNCHECKED_CAST")
  @Test
  fun dslList_IteratorIsNotEvenSecretlyMutable() {
    val dslList = DslList<Int, DummyProxy>(mutableListOf(1, 2, 3))
    val iterator = dslList.iterator() as java.util.Iterator<Int>
    iterator.next()

    assertFailsWith<UnsupportedOperationException> {
      iterator.remove()
    }
  }

  @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN", "UNCHECKED_CAST")
  @Test
  fun dslList_ListIteratorIsNotEvenSecretlyMutable() {
    val dslList = DslList<Int, DummyProxy>(mutableListOf(1, 2, 3))
    val iterator = dslList.listIterator() as java.util.ListIterator<Int>
    iterator.next()

    assertFailsWith<UnsupportedOperationException> {
      iterator.remove()
    }
  }

  @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN", "UNCHECKED_CAST")
  @Test
  fun dslList_ListIteratorIndexIsNotEvenSecretlyMutable() {
    val dslList = DslList<Int, DummyProxy>(mutableListOf(1, 2, 3))
    val iterator = dslList.listIterator(1) as java.util.ListIterator<Int>
    iterator.next()

    assertFailsWith<UnsupportedOperationException> {
      iterator.remove()
    }
  }

  @Test
  fun expectedToString() {
    assertThat(DslList<Int, DummyProxy>(listOf(1, 2)).toString()).isEqualTo("[1, 2]")
  }

  @Test
  fun equality() {
    EqualsTester()
      .addEqualityGroup(DslList<Int, DummyProxy>(listOf(1, 2)), listOf(1, 2))
      .addEqualityGroup(DslList<Int, DummyProxy>(listOf(2, 2)), listOf(2, 2))
      .addEqualityGroup(
        DslList<Int, DummyProxy>(emptyList()),
        DslList<String, DummyProxy>(emptyList()),
        emptyList<Int>()
      )
      .testEquals()
  }
}
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc.  All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following con


t made any changes on individual fields. You’re probably looking for the Go button rather than the Save button.");
                    if (!confirm(text)) {
                        event.preventDefault();
                    }
                }
            });
        }
    };

    // Call function fn when the DOM is loaded and ready. If it is already
    // loaded, call the function now.
    // http://youmightnotneedjquery.com/#ready
    function ready(fn) {
        if (document.readyState !== 'loading') {
            fn();
        } else {
            document.addEventListener('DOMContentLoaded', fn);
        }
    }

    ready(function() {
        const actionsEls = document.querySelectorAll('tr input.action-select');
        if (actionsEls.length > 0) {
            Actions(actionsEls);
        }
    });
}
import pkg from '../../package.json'

const CAL_VERSION = pkg.dependencies['@liquality/client'].replace('^', '').replace('~', '')
const footerVersion = `${process.env.REACT_APP_COMMIT_REF || 'dev'} + CAL ${CAL_VERSION}`

export default {
  assets: {
      MATIC: {
    rpc: {
      url: 'https://rpc-mumbai.maticvigil.com/'
    },
    api: {
      type: 'scraper',
      url: 'https://liquality.io/polygon-testnet-api'
    },
    network: 'polygon_testnet',
    explorerPath: 'https://explorer-mumbai.maticvigil.com/tx/0x'
  },
    ETH: {
      rpc: {
        url: 'https://rinkeby.infura.io/v3/37efa691ffec4c41a60aa4a69865d8f6'
      },
      api: {
        type: 'scraper',
        url: 'https://liquality.io/eth-rinkeby-api'
      },
      network: 'rinkeby',
      explorerPath: 'https://rinkeby.etherscan.io/tx/0x'
    },
    BTC: {
      api: {
        url: 'https://liquality.io/testnet/electrs'
      },
      batchApi: {
        url: 'https://liquality.io/electrs-testnet-batch'
      },
      feeNumberOfBlocks: 2,
      network: 'bitcoin_testnet',
      explorerPath: 'https://blockstream.info/testnet/tx/'
    },
    RBTC: {
      rpc: {
        url: 'https://public-node.testnet.rsk.co'
      },
      api: {
        type: 'scraper',
        url: 'https://liquality.io/rsk-testnet-api'
      },
      network: 'rsk_testnet',
      explorerPath: 'https://explorer.testnet.rsk.co/tx/0x'
    },
    DAI: {
      type: 'erc20',
      rpc: {
        url: 'https://rinkeby.infura.io/v3/37efa691ffec4c41a60aa4a69865d8f6'
      },
      api: {
        type: 'scraper',
        url: 'https://liquality.io/eth-rinkeby-api'
      },
      contractAddress: '0xcE2748BE67fB4346654B4500c4BB0642536365FC',
      network: 'rinkeby',
      explorerPath: 'https://rinkeby.etherscan.io/tx/0x'
    },
    USDC: {
      type: 'erc20',
      rpc: {
        url: 'https://rinkeby.infura.io/v3/37efa691ffec4c41a60aa4a69865d8f6'
      },
      api: {
        type: 'scraper',
        url: 'https://liquality.io/eth


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace QSlim.MxKit
{
    internal class MxStdSlim
    {
        protected MxStdModel model;
        protected MxHeap heap;

        internal int ValidVerts;
        internal int ValidFaces;
        internal bool IsInitialized;

        internal MxPlacement PlacementPolicy;
        internal MxWeighting WeightingPolicy;
        internal bool WillJoinOnly;

        internal double BoundaryWeight;
        internal double CompactnessRatio;
        internal double MeshingPenalty;
        internal double LocalValidityThreshold;
        internal int VertexDegreeLimit;

        internal MxStdSlim(MxStdModel model)
        {
            heap = new MxHeap(64);
            this.model = model;
            PlacementPolicy = MxPlacement.Optimal;
            WeightingPolicy = MxWeighting.Area;
            BoundaryWeight = 1000.0


 = 26,
        lineContent = "// todo(#4577473) test description 18"
      )
    )
    assertThat(collectedTodos).contains(
      Todo(
        file = tempFile,
        lineNumber = 27,
        lineContent = "// some comment which has a todo(#12182999): some description"
      )
    )
    assertThat(collectedTodos).contains(
      Todo(
        file = tempFile,
        lineNumber = 30,
        lineContent = "todo"
      )
    )
    assertThat(collectedTodos).contains(
      Todo(
        file = tempFile,
        lineNumber = 33,
        lineContent = "TODO(#ISSUE_NUMBER): Revert ownership to @USERNAME after YYYY-MM-DD."
      )
    )
    assertThat(collectedTodos).contains(
      Todo(
        file = tempFile,
        lineNumber = 34,
        lineContent = "//TODO(#161614): some another test description"
      )
    )
  }

  @Test
  fun testTodoCollector_addTodosAcrossMultipleFiles_invokeTodoCollector() {
    val testContent1 =
      """
      # TODO (#121): test todo.
      <!--TODO(#101)-->
      """.trimIndent()
    val testContent2 =
      """
      # TODO(#10500): Test description
      """.trimIndent()
    val testContent3 =
      """
      // TODO(#17800): test todo.
      // TODO(    210)
      """.trimIndent()
    val tempFile1 = tempFolder.newFile("testfiles/TempFile1.txt")
    val tempFile2 = tempFolder.newFile("testfiles/TempFile2.bazel")
    val tempFile3 = tempFolder.newFile("testfiles/TempFile3.kt")
    tempFile1.writeText(testContent1)
    tempFile2.writeText(testContent2)
    tempFile3.writeText(testContent3)

    val collectedTodos = TodoCollector.collectTodos(retrieveTestFilesDirectoryPath())
    assertThat(collectedTodos).hasSize(5)
    assertThat(collectedTodos).contains(
      Todo(
        file = tempFile1,
        lineNumber = 1,
        lineContent = "# TODO (#121): test todo."
      )
    )
    assertThat(collectedTodos).contains(
      Todo(
        file = tempFile1,
        lineNumber = 2,
        lineContent = "<!--TODO(#101)-->"
      )
    )
    assertThat(collectedTodos).contains(
      Todo(
        file = tempFile2,
        lineNumber = 1,
        lineContent = "# TODO(#10500): Test description"
      )
    )
    assertThat(collectedTodos).contains(
      Todo(
        file = tempFile3,
        lineNumber = 1,
        lineContent = "// TODO(#17800): test todo."
      )
    )
    assertThat(collectedTodos).contains(
      Todo(
        file = tempFile3,
        lineNumber = 2,
        lineContent = "// TODO(    210)"
      )
    )
  }

  @Test
  fun testTodoCollector_addTodos_invokePoorlyFormattedTodoCollector() {
    val testContent1 =
      """
      //TODO(#1215545): test todo.
      # TODO(    110)
      //todo(#15444)
      <!--TODO(# 101)-->
      """.trimIndent()
    val testContent2 =
      """
      <!--
      TODO(# 105)
      -->
      """.trimIndent()
    val testContent3 =
      """
      // TODO (#178): test todo.

      # TODO(    210)
      """.trimIndent()
    val tempFile1 = tempFolder.newFile("testfiles/TempFile1.txt")
    val tempFile2 = tempFolder.newFile("t


trn1            \r2\wd, \r2\wd, \r3\wd
        trn1            \r3\wd, \r3\wd, \r4\wd
.endif
.endm
.macro interleave_1_h r0, r1, r2, r3, r4
        interleave_1    .4h, \r0, \r1, \r2, \r3, \r4
.endm
.macro interleave_1_s r0, r1, r2, r3, r4
        interleave_1    .2s, \r0, \r1, \r2, \r3, \r4
.endm
.macro interleave_2 wd, r0, r1, r2, r3, r4, r5
        trn1            \r0\wd,  \r0\wd, \r2\wd
        trn1            \r1\wd,  \r1\wd, \r3\wd
        trn1            \r2\wd,  \r2\wd, \r4\wd
        trn1            \r3\wd,  \r3\wd, \r5\wd
.endm
.macro interleave_2_s r0, r1, r2, r3, r4, r5
        interleave_2    .2s, \r0, \r1, \r2, \r3, \r4, \r5
.endm
.macro uxtl_b r0, r1, r2, r3, r4, r5, r6
        uxtl            \r0\().8h, \r0\().8b
        uxtl            \r1\().8h, \r1\().8b
.ifnb \r2
        uxtl            \r2\().8h, \r2\().8b
        uxtl            \r3\().8h, \r3\().8b
.endif
.ifnb \r4
        uxtl            \r4\().8h, \r4\().8b
.endif
.ifnb \r5
        uxtl            \r5\().8h, \r5\().8b
.endif
.ifnb \r6
        uxtl            \r6\().8h, \r6\().8b
.endif
.endm
.macro mul_mla_4tap d, s0, s1, s2, s3, wd
        mul             \d\wd,  \s0\wd,  v0.h[0]
        mla             \d\wd,  \s1\wd,  v0.h[1]
        mla             \d\wd,  \s2\wd,  v0.h[2]
        mla             \d\wd,  \s3\wd,  v0.h[3]
.endm
// Interleaving the mul/mla chains actually hurts performance
// significantly on Cortex A53, thus keeping mul/mla tightly
// chained like this.
.macro mul_mla_6tap_0_4h d0, s0, s1, s2, s3, s4, s5, s6, s7
        mul             \d0\().4h, \s1\().4h, v0.h[1]
        mla             \d0\().4h, \s2\().4h, v0.h[2]
        mla             \d0\().4h, \s3\().4h, v0.h[3]
        mla             \d0\().4h, \s4\().4h, v0.h[4]
        mla             \d0\().4h, \s5\().4h, v0.h[5]
        mla             \d0\().4h, \s6\().4h, v0.h[6]
.endm
.macro mul_mla_6tap_0 d0, s0, s1, s2, s3


	val variantId = instruction.operand<L2WriteIntOperand>(1)

		// :: variantId = staticObjectVariantId(value);
		translator.load(method, value.register())
		staticObjectVariantIdMethod.generateCall(method)
		translator.store(method, variantId.register())
	}
}
/*
 * L2SemanticSlot.kt
 * Copyright © 1993-2022, The Avail Foundation, LLC.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * * Redistributions of source code must retain the above copyright notice, this
 *   list of conditions and the following disclaimer.
 *
 * * Redistributions in binary form must reproduce the above copyright notice,
 *   this list of conditions and the following disclaimer in the documentation
 *   and/or other materials provided with the distribution.
 *
 * * Neither the name of the copyright holder nor the names of the contributors
 *   may be used to endorse or promote products derived from this software
 *   without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
package avail.optimizer.values

import avail.descriptor.functions.A_Continuation
import avail.descriptor.representation.AvailObject

/**
 * A semantic value which represents a slot of some [Frame]'s effective
 * [A_Continuation].
 *
 * @author Mark van Gulik <mark@availlang.org>
 * @property slotIndex
 *   The one-based index of the slot in its [Frame].
 * @property pcAfter
 *   The level one [A_Continuation.pc] at the position just after the nybblecode
 *   instruction that produced this value.  This serves to distinguish semantic
 *   slots at the same index but at different times, allowing a correct SSA
 *   graph and the reordering that it supports.
 *
 * @constructor
 * Create a new `L2SemanticSlot` semantic value.
 *
 * @param frame
 *   The frame for which this represents a slot of a virtualized continuation.
 * @param slotIndex
 *   The one-based index of the slot in that frame.
 * @param pcAfter
 *   The L1 program counter just after the instruction responsible for
 *   effectively writing this value in the frame's slot.
 * @param optionalName
 *   Either a [String] that provides a useful naming hint for this slot, or
 *   `null`.
 */
internal class L2SemanticSlot constructor(
	frame: Frame,
	val slotIndex: Int,
	val pcAfter: Int,
	val optionalName: String?
) : L2FrameSpecificSemanticValue(
	frame, slotIndex * AvailObject.multiplier xor pcAfter)
{
	init
	{
		assert(slotIndex >= 1)
	}

	// Note: Ignore the optionalName.
	override fun equalsSemanticValue(other: L2SemanticValue): Boolean =
		(other is L2SemanticSlot
			&& super.equalsSemanticValue(other)
			&& slotIndex == other.slotIndex
			&& pcAfter == other.pcAfter)

	override fun transform(
		semanticValueTransformer: (L2SemanticValue) -> L2SemanticValue,
		frameTransformer: (Frame) -> Frame): L2SemanticValue =
			frameTransformer(frame()).let {
			if (it == frame()) this
			else L2SemanticSl


2, 06, 03) => return true,
        (2002, 06, 04) => return true,  // Extra For Jubilee
        (2011, 04, 29) => return true,  // Extra For Royal Wedding
        (2012, 05, 28) => return false, // Moved for Jubilee
        (2012, 06, 04) => return true,
        (2012, 06, 05) => return true,  // Extra For Jubilee
        (2020, 05, 04) => return false, // Move for VE Day
        (2020, 05, 08) => return true,
        (2022, 05, 30) => return false, // Move for Jubilee
        (2022, 06, 02) => return true,
        (2022, 06, 03) => return true,  // Extra for Jubilee
        _ => {}
    }

    let new_years_day = |m, d| m == 1 && d == 1;
    let new_years_sub = |m, d| m == 1 && d <= 3;
    let early_may = |m, d| m == 5 && d <= 7;
    let spring = |m, d| m == 5 && 31 - 7 < d;
    let summer = |m, d| m == 8 && 31 - 7 < d;
    let christmas_or_boxingday = |day, m, d| {
        m == 12 &&
        match day {
            Weekday::Mon | Weekday::Tue => d >= 25 && d < 29,
            _ => d >= 25 && d < 27,
        }
    };

    match day {
        Weekday::Sat | Weekday::Sun => false,
        Weekday::Mon => {
            new_years_sub(m, d) || early_may(m, d) || spring(m, d) || summer(m, d) ||
            christmas_or_boxingday(day, m, d) ||
            ((m == 3 || m == 4) && easter_ordinal(y) + 1 == date.ordinal())
        }
        _ => {
            new_years_day(m, d) || christmas_or_boxingday(day, m, d) ||
            (day == Weekday::Fri && (m == 3 || m == 4) && easter_ordinal(y) == date.ordinal() + 2)
        }
    }
}

pub trait BankHoliday {
    fn is_bankholiday(&self) -> bool;
}

impl<T: Datelike> BankHoliday for T {
    fn is_bankholiday(&self) -> bool {
        self::is_bankholiday(self)
    }
}

#[cfg(test)]
mod tests {
    use super::*;
    use chrono::{NaiveDate, Datelike, Duration};

    macro_rules! test {
        ($name:ident, $year:expr, $dates:expr) => {
            #[test]
            fn $name() {
                let ymd = |y, m, d| NaiveDate::from_ymd(y, m, d);
                let jan1 = ymd($year, 1, 1);
                let days = if NaiveDate::from_ymd_opt($year, 2, 29).is_some() {
                    366
                } else {
                    365
                };
                for i in 0..days {
                    let date = jan1 + Duration::days(i);
                    let holiday = date.is_bankholiday();
                    let expected = $dates.contains(&(date.day(), date.month()));
                    assert!(expected == holiday,
                            format!("Expected {} for {} but got {}", expected, date, holiday));
                    assert_eq!(is_bankholiday(&date), holiday);
                }
            }
        }
    }

    test!(year_1999, 1999,
          [(1, 1), (2, 4), (5, 4), (3, 5), (31, 5), (30, 8), (27, 12), (28, 12), (31, 12)]);

    test!(year_2002, 2002,
          [(1, 1), (29, 3), (1, 4), (6, 5), (3, 6), (4, 6), (26, 8), (25, 12), (26, 12)]);

    test!(year_2012, 2012,
          [(2, 1), (6, 4), (9,


keys, "Freestanding"})
_ui.resolver.edge_yaw:depend({_ui.lua.enable, true}, {_ui.lua.tab, "Anti-aim"}, {_ui.resolver.keys, "Edge yaw"})
_ui.resolver.manual_left:depend({_ui.lua.enable, true}, {_ui.lua.tab, "Anti-aim"}, {_ui.resolver.keys, "Manuals"})
_ui.resolver.manual_right:depend({_ui.lua.enable, true}, {_ui.lua.tab, "Anti-aim"}, {_ui.resolver.keys, "Manuals"})
_ui.misc.clantag_h:depend({_ui.lua.enable, true}, {_ui.lua.tab, "Miscellaneous"})
_ui.misc.fast_ladder:depend({_ui.lua.enable, true}, {_ui.lua.tab, "Miscellaneous"})
_ui.visuals.style_round:depend({_ui.lua.enable, true}, {_ui.lua.tab, "Visuals"}, {_ui.visuals.style, "Modern"})
_ui.visuals.style_width:depend({_ui.lua.enable, true}, {_ui.lua.tab, "Visuals"}, {_ui.visuals.style, "Modern"})

-- hide refs
local hide_refs = function(value)
    value = not value
    ui.set_visible(ref.aa_enable, value) ui.set_visible(ref.pitch, value) ui.set_visible(ref.pitch_value, value)
    ui.set_visible(ref.yaw_base, value) ui.set_visible(ref.yaw, value) ui.set_visible(ref.yaw_value, value)
    ui.set_visible(ref.yaw_jitter, value) ui.set_visible(ref.yaw_jitter_value, value) ui.set_visible(ref.body_yaw, value)
    ui.set_visible(ref.body_yaw_value, value) ui.set_visible(ref.edgeyaw, value) ui.set_visible(ref.freestand[1], value)
    ui.set_visible(ref.freestand[2], value) ui.set_visible(ref.roll, value) ui.set_visible(ref.freestand_body_yaw, value)
end

-- [ config system ]
local config_items = {
    _ui.antiaim,
    aa_builder,
    aa_builder_defensive
}

local package, data, encrypted, decrypted = pui.setup(config_items), "", "", ""
config = {}

config.export = function()
    data = package:save()
    encrypted = base64.encode(json.stringify(data))
    clipboard_export(encrypted)
    new_notify("Successfully! Exported settings to clipboard", 255,255,255,255)
end

config.import = function(input)
    decrypted = json.parse(base64.decode(input ~= nil and input or clipboard_import()))
    package:load(decrypted)
    new_notify("Successfully! Imported settings from clipboard", 255,255,255,255)
end

-- [ antiaim features ]
local function choking(cmd)
    local choke = false

    if cmd.allow_send_packet == false or cmd.chokedcommands > 1 then
        choke = true
    else
        choke = false
    end

    return choke
end

local ref_aim_check = ui.reference("Rage", "Aimbot", "Enabled")
local ref_duckpeek = ui.reference("Rage", "Other", "Duck peek assist")

local m_iSide = 0
function manualaa()
    if m_iSide == 0 then
        if ui.get(_ui.resolver.manual_left.ref) then
            m_iSide = 1
        elseif ui.get(_ui.resolver.manual_right.ref) then
            m_iSide = 2
        end
    elseif m_iSide == 1 then
        if ui.get(_ui.resolver.manual_right.ref) th


sDir string) {
	setupTestLinksInDir(t, linksDir)

	testDir := filepath.Join(linksDir, "testdir")
	err := os.MkdirAll(testDir, 0755)
	if err != nil {
		t.Fatalf("Failed to create test directory: %v", err)
	}

	nestedFile := filepath.Join(testDir, "nested.txt")
	err = os.WriteFile(nestedFile, []byte("nested content"), 0644)
	if err != nil {
		t.Fatalf("Failed to create nested test file: %v", err)
	}
}
package terminal

import (
	"pentagi/cmd/installer/wizard/terminal/vt"

	tea "github.com/charmbracelet/bubbletea"
	uv "github.com/charmbracelet/ultraviolet"
)

// teaKeyToUVKey converts a BubbleTea KeyMsg to an Ultraviolet KeyEvent
func teaKeyToUVKey(msg tea.KeyMsg) uv.KeyEvent {
	key := tea.Key(msg)

	// Build modifiers
	var mod vt.KeyMod
	if key.Alt {
		mod |= vt.ModAlt
	}

	// Map special keys
	switch key.Type {
	case tea.KeyEnter:
		return vt.KeyPressEvent{Code: vt.KeyEnter, Mod: mod}
	case tea.KeyTab:
		return vt.KeyPressEvent{Code: vt.KeyTab, Mod: mod}
	case tea.KeyBackspace:
		return vt.KeyPressEvent{Code: vt.KeyBackspace, Mod: mod}
	case tea.KeyEscape:
		return vt.KeyPressEvent{Code: vt.KeyEscape, Mod: mod}
	case tea.KeySpace:
		return vt.KeyPressEvent{Code: vt.KeySpace, Mod: mod}

	// Arrow keys
	case tea.KeyUp:
		return vt.KeyPressEvent{Code: vt.KeyUp, Mod: mod}
	case tea.KeyDown:
		return vt.KeyPressEvent{Code: vt.KeyDown, Mod: mod}
	case tea.KeyLeft:
		return vt.KeyPressEvent{Code: vt.KeyLeft, Mod: mod}
	case tea.KeyRight:
		return vt.KeyPressEvent{Code: vt.KeyRight, Mod: mod}

	// Navigation keys
	case tea.KeyHome:
		return vt.KeyPressEvent{Code: vt.KeyHome, Mod: mod}
	case tea.KeyEnd:
		return vt.KeyPressEvent{Code: vt.KeyEnd, Mod: mod}
	case tea.KeyPgUp:
		return vt.KeyPressEvent{Code: vt.KeyPgUp, Mod: mod}
	case tea.KeyPgDown:
		return vt.KeyPressEvent{Code: vt.KeyPgDown, Mod: mod}
	case tea.KeyDelete:
		return vt.KeyPressEvent{Code: vt.KeyDelete, Mod: mod}
	case tea.KeyInsert:
		return vt.KeyPressEvent{Code: vt.KeyInsert, Mod: mod}

	// Function keys
	case tea.KeyF1:
		return vt.KeyPressEvent{Code: vt.KeyF1, Mod: mod}
	case tea.KeyF2:
		return vt.KeyPressEvent{Code: vt.KeyF2, Mod: mod}
	case tea.KeyF3:
		return vt.KeyPressEvent{Code: vt.KeyF3, Mod: mod}
	case tea.KeyF4:
		return vt.KeyPressEvent{Code: vt.KeyF4, Mod: mod}
	case tea.KeyF5:
		return vt.KeyPressEvent{Code: vt.KeyF5, Mod: mod}
	case tea.KeyF6:
		return vt.KeyPressEvent{Code: vt.KeyF6, Mod: mod}
	case tea.KeyF7:
		return vt.KeyPressEvent{Code: vt.KeyF7, Mod: mod}
	case tea.KeyF8:
		return vt.KeyPressEvent{Code: vt.KeyF8, Mod: mod}
	case tea.KeyF9:
		return vt.KeyPressEvent{Code: vt.KeyF9, Mod: mod}
	case tea.KeyF10:
		return vt.KeyPressEvent{Code: vt.KeyF10, Mod: mod}
	case tea.KeyF11:
		return vt.KeyPressEvent{Code: vt.KeyF11, Mod: mod}
	case tea.KeyF12


Controller({required void Function() onRebuildRequested})
      : _onRebuildRequested = onRebuildRequested {
    if (!_repository.anyWorkspaceConfigExists()) {
      _currentState = HomeEmptyState();
    } else {
      _currentState = HomeInitializedState();
    }
  }

  void gotoCreateRoute({WorkspaceEntity? workspaceEntity}) {
    DependencyInjection.find<RouteService>().gotoRoute(
      RouteService.createRoute,
      arguments: workspaceEntity,
    );
  }

  Set<WorkspaceEntity> getWorkspaces() {
    return _repository.getWorkspaces();
  }

  void onEvent(HomeEvent event) {
    switch (event.runtimeType) {
      case HomeEmptyEvent:
        _currentState = HomeEmptyState();
      case HomeInitializedEvent:
        _currentState = HomeInitializedState();
    }
    refreshUI();
  }

  HomeState getCurrentState() {
    return _currentState;
  }

  void refreshUI() {
    _onRebuildRequested();
  }
}
// Daemon Integration Test

import 'dart:io';

import 'package:flutter_test/flutter_test.dart';

void main() {
  test(
    "Checking Daemon Integration ...",
    () {
      final daemonBin = File('/usr/bin/cliptopia-daemon');
      final exists = daemonBin.existsSync();
      expect(exists, true);
    },
  );

  test(
    "Checking Daemon Binary ...",
    () {
      const command = '/usr/bin/cliptopia-daemon';
      final output = Process.runSync(command, ['--version']).stdout;
      final containsVersion = output.contains('version');
      expect(containsVersion, true);
    },
  );

  test(
    "Starting Daemon ...",
    () async {
      const command = '/usr/bin/cliptopia-daemon';
      await Process.start(command, ['--start']);
      await Future.delayed(const Duration(seconds: 1));
      final lockFile = File(
          "${Directory.systemTemp.path}${Platform.pathSeparator}.cliptopia-daemon-lock");
      expect(lockFile.existsSync(), true);
    },
  );

  test(
    "Checking Daemon Status ...",
    () async {
      const command = '/usr/bin/cliptopia-daemon';
      final output = Process.runSync(command, ['--status']).stdout;
      final containsVersion = output.contains('Alive');
      expect(containsVersion, true);
    },
  );

  test(
    "Stopping Daemon ...",
    () async {
      const command = '/usr/bin/cliptopia-daemon';
      final output = Process.runSync(command, ['--stop']).stdout;
      final isStopped = output.contains('Stopped');
      expect(isStopped, true);
    },
  );

  test(
    "Resetting Cache ...",
    () async {
      const command = '/usr/bin/cliptopia-daemon';
      final output = Process.runSync(command, ['--reset-cache']).stdout;
      final cleared = output.contains('Cleared') || output.contains("Nothing");
      expect(cleared, true);
    },
  );
}
import 'dart:io';

import 'package:cliptopia/app/clipboard/domain/entity/clipboard_entity.dart';
import 'package:cliptopia/core/database/database.dart';
import 'package:cliptopia/core/services/injector.dart';
import 'package:cliptopia/core/storage/json_configurator.dart';
import 'package:cliptopia/core/utils.dart';
import 'package:thread/thread.dart';

/// Watches cache maintained by the daemon
class ClipboardEngine {
  ClipboardEngine();

  late Thread thread;
  final database = Injector.find<Database>();
  JsonConfigurator? _clipboardCacheReader;

  void start({onStarted}) async {
    final cacheFile = File(
        combineHomePa


)
			},
		),
		withValidationFunc(func(s *suite) bool {
			rootClusters, err := s.root.GetAuthServer().GetKubernetesServers(ctx)
			require.NoError(t, err)
			leafClusters, err := s.leaf.GetAuthServer().GetKubernetesServers(ctx)
			require.NoError(t, err)
			return len(rootClusters) >= 1 && len(leafClusters) >= 1
		}),
	)

	// We create another kube_server in the leaf cluster to test that we can
	// deduplicate the results when multiple replicas of the same resource
	// exist.
	kubeCluster, err := types.NewKubernetesClusterV3(types.Metadata{
		Name: leafKubeCluster,
	}, types.KubernetesClusterSpecV3{})
	require.NoError(t, err)
	kubeServer, err := types.NewKubernetesServerV3FromCluster(kubeCluster, "host", uuid.New().String())
	require.NoError(t, err)
	_, err = s.leaf.GetAuthServer().UpsertKubernetesServer(ctx, kubeServer)
	require.NoError(t, err)

	type args struct {
		teleportCluster string
		kind            string
		extraArgs       []string
	}
	tests := []struct {
		name      string
		args      args
		wantTable func() string
	}{
		{
			name: "list pods in root cluster for default namespace",
			args: args{
				teleportCluster: rootClusterName,
				extraArgs:       []string{fmt.Sprintf("--kube-cluster=%v", rootKubeCluster)},
				kind:            types.KindKubePod,
			},
			wantTable: func() string {
				table := asciitable.MakeTableWithTruncatedColumn(
					[]string{"Name", "Namespace", "Labels", "Resource ID"},
					[][]string{
						{"nginx-1", "default", "", fmt.Sprintf("/%s/kube:ns:pods/%s/default/nginx-1", rootClusterName, rootKubeCluster)},
						{"nginx-2", "default", "", fmt.Sprintf("/%s/kube:ns:pods/%s/default/nginx-2", rootClusterName, rootKubeCluster)},
						{"test", "default", "", fmt.Sprintf("/%s/kube:ns:pods/%s/default/test", rootClusterName, rootKubeCluster)},
					},
					"Labels")
				return table.AsBuffer().String()
			},
		},
		{
			name: "list pods in root cluster for dev namespace with search",
			args: args{
				teleportCluster: rootClusterName,
				extraArgs:       []string{fmt.Sprintf("--kube-cluster=%v", rootKubeCluster), "--kube-namespace=dev", "--search=nginx-1"},
				kind:            types.KindKubePod,
			},
			wantTable: func() string {
				table := asciitable.MakeTableWithTruncatedColumn(
					[]string{"Name", "Namespace", "Labels", "Resource ID"},
					[][]string{
						{"nginx-1", "dev", "", fmt.Sprintf("/%s/kube:ns:pods/%s/dev/nginx-1", rootClusterName, rootKubeCluster)},
					},
					"Labels")
				return table.AsBuffer().String()
			},
		},
		{
			name: "list pods in leaf cluster for default namespace",
			args: args{
				teleportCluster: leafClusterName,
				extraArgs:       []string{fmt.Sprintf("--kube-cluster=%v", leafKubeCluster)},
				kind:            types.KindKubePod,
			},
			wantTable: func() string {
				table := asciitable.MakeTableWithTruncatedColumn(
					[]string{"Name", "Namespace", "Labels", "Resource ID"},
					[][]string{
						{"nginx-1", "default", "", fmt.Sprintf("/%s/kube:ns:pods/%s/default/nginx-1", leafCluster


被交托给我们照看，那在没有上头命令的情况下，我们可不敢擅自将公主带去其他任何地方啊。”

“所以不是都说了嘛，我一个人去就可以了。”碧莉娜怒气冲冲的视线，忽然猛地对上了正向她走来的欧鲁巴的眼睛。“如果一定要命令的话，就让那边那个皇子给一个不就行了嘛。”

“行了，都退下。”

遣散了一脸不满的士兵，机库内只剩下欧鲁巴与公主两个人。碧莉娜依然把手搁在飞空艇的坐席上，视线撇向这里。梅菲乌斯飞空艇大多模仿翼龙的造型，不像加贝拉的那么多变。

“你想干什么。”

“你问干什么？”少女公主眼角向上吊起。“那么，我是否可以反过来问你。皇子究竟想要干什么？既然你什么都不想干的话，大不了由我来代替你做而已。”

“哦。也就是说你想自己亲自出击，让你的同胞们流血吗？”

“并，并不是这样。我怎么会做这种……”

就在碧莉娜怒火即将爆发的瞬间，为了不被对方牵着鼻子走，顿了一下，深深吸了口气，

“加贝拉在没有梅菲乌斯侧援助的情况下，只能坐以待毙。鲜血早已在流了。我怎么可以对此坐视不理。”

“如果打也不成，不打也不成的话，那这两种事我都不打算去干。”

无意间，欧鲁巴用上了粗鲁的语气。自己明明能在其他贵族或将军面前演好自己的角色，但在这位公主面前，自己不知为何总是会乱了阵脚。公主过于直率，以至于对隐瞒身份的他来说，会下意识对她报有一种愧疚感。

“什么意思？”

“意思就是留卡奥心里非常清楚，此次梅菲乌斯会参与对他的讨伐。”

“你的意思是对方会布下陷阱吗？可就算真是这样，为什么你还能


using System;
using UnityEngine;
using UnityObject = UnityEngine.Object;

namespace Unity.VisualScripting.FullSerializer
{
#if !UNITY_EDITOR && UNITY_WSA
// For System.Reflection.TypeExtensions
    using System.Reflection;
#endif

    /// <summary>
    /// Extend this interface on your type to receive notifications about
    /// serialization/deserialization events. If you don't have access to the
    /// type itself, then you can write an fsObjectProcessor instead.
    /// </summary>
    public interface fsISerializationCallbacks
    {
        /// <summary>
        /// Called before serialization.
        /// </summary>
        void OnBeforeSerialize(Type storageType);

        /// <summary>
        /// Called after serialization.
        /// </summary>
        /// <param name="storageType">
        /// The field/property type that is storing the instance.
        /// </param>
        /// <param name="data">The data that was serialized.</param>
        void OnAfterSerialize(Type storageType, ref fsData data);

        /// <summary>
        /// Called before deserialization.
        /// </summary>
        /// <param name="storageType">
        /// The field/property type that is storing the instance.
        /// </param>
        /// <param name="data">
        /// The data that will be used for deserialization.
        /// </param>
        void OnBeforeDeserialize(Type storageType, ref fsData data);

        /// <summary>
        /// Called after deserialization.
        /// </summary>
        /// <param name="storageType">
        /// The field/property type that is storing the instance.
        /// </param>
        /// <param name="instance">The type of the instance.</param>
        void OnAfterDeserialize(Type storageType);
    }

    public class fsSerializationCallbackProcessor : fsObjectProcessor
    {
        public override bool CanProcess(Type type)
        {
            return typeof(fsISerializationCallbacks).IsAssignableFrom(type);
        }

        public override void OnBeforeSerialize(Type storageType, object instance)
        {
            // Don't call the callback on null instances.
            if (instance == null)
            {
                return;
            }
            ((fsIS


oc( 100 ); }

This example is a bit contrived but it serves to illustrate how
destructors work.  The example shows a non-terminal named
``nt'' that holds values of type ``void*''.  When the rule for
an ``nt'' reduces, it sets the value of the non-terminal to
space obtained from malloc().  Later, when the nt non-terminal
is popped from the stack, the destructor will fire and call
free() on this malloced space, thus avoiding a memory leak.
(Note that the symbol ``$$'' in the destructor code is replaced
by the value of the non-terminal.)

It is important to note that the value of a non-terminal is passed
to the destructor whenever the non-terminal is removed from the
stack, unless the non-terminal is used in a C-code action.  If
the non-terminal is used by C-code, then it is assumed that the
C-code will take care of destroying it if it should really
be destroyed.  More commonly, the value is used to build some
larger structure and we don't want to destroy it, which is why
the destructor is not called in this circumstance.

By appropriate use of destructors, it is possible to
build a parser using Lemon that can be used within a long-running
program, such as a GUI, that will not leak memory or other resources.
To do the same using yacc or bison is much more difficult.

The <tt>%extra_argument</tt> directive

The %extra_argument directive instructs Lemon to add a 4th parameter
to the parameter list of the Parse() function it generates.  Lemon
doesn't do anything itself with this extra argument, but it does
make the argument available to C-code action routines, destructors,
and so forth.  For example, if the grammar file contains:

    %extra_argument { MyStruct *pAbc }

Then the Parse() function generated will have an 4th parameter
of type ``MyStruct*'' and all action routines will have access to
a variable named ``pAbc'' that is the value of the 4th parameter
in the most recent call to Parse().

The <tt>%include</tt> directive

The %include directive specifies C code that is included at the
top of the generated parser.  You can include any text you want --
the Lemon parser generator copies to blindly.  If you have multiple
%include directives in your grammar file, their values are concatenated
before being put at the beginning of the generated parser.

The %include directive is very handy for getting some extra #include
preprocessor statements at the beginning of the generated parser.
For example:

   %include {#include <unistd.h>}

This might be needed, for example, if some of the C actions in the
grammar call functions that are prototyed in unistd.h.

The <tt>%left</tt> directive

The %left directive is used (along with the %right and
%nonassoc directives) to declare precedences of terminal
symbols.  Every terminal symbol whose name appears after
a %left directive but before the next period (``.'') is
given the same left-associative precedence value.  Subsequent
%left directives have higher precedence.  For example:

   %left AND.
   %left OR.
   %nonassoc EQ NE GT GE LT LE.
   %left PLUS MINUS.
   %left TIMES DIVIDE MOD.
   %right EXP NOT.

Note the period that terminates each %left, %right or %nonassoc
directive.

LALR(1) grammars can get into a situation where they require
a large amount of stack space if you make heavy use or right-associative
operators.  For this reason, it is recommended that you use %left


 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 org.robovm.apple.coreservices;

/*<imports>*/
import java.io.*;
import java.nio.*;
import java.util.*;
import org.robovm.objc.*;
import org.robovm.objc.annotation.*;
import org.robovm.objc.block.*;
import org.robovm.rt.*;
import org.robovm.rt.annotation.*;
import org.robovm.rt.bro.*;
import org.robovm.rt.bro.annotation.*;
import org.robovm.rt.bro.ptr.*;
import org.robovm.apple.foundation.*;
import org.robovm.apple.corefoundation.*;
/*</imports>*/

/*<javadoc>*/

/*</javadoc>*/
/*<annotations>*//*</annotations>*/
public enum /*<name>*/CFNetworkErrors/*</name>*/ implements ValuedEnum {
    No(0L),
    /*<values>*/
    HostErrorHostNotFound(1L),
    HostErrorUnknown(2L),
    SOCKSErrorUnknownClientVersion(100L),
    SOCKSErrorUnsupportedServerVersion(101L),
    SOCKS4ErrorRequestFailed(110L),
    SOCKS4ErrorIdentdFailed(111L),
    SOCKS4ErrorIdConflict(112L),
    SOCKS4ErrorUnknownStatusCode(113L),
    SOCKS5ErrorBadState(120L),
    SOCKS5ErrorBadResponseAddr(121L),
    SOCKS5ErrorBadCredentials(122L),
    SOCKS5ErrorUnsupportedNegotiationMethod(123L),
    SOCKS5ErrorNoAcceptableMethod(124L),
    FTPErrorUnexpectedStatusCode(200L),
    ErrorHTTPAuthenticationTypeUnsupported(300L),
    ErrorHTTPBadCredentials(301L),
    ErrorHTTPConnectionLost(302L),
    ErrorHTTPParseFailure(303L),
    ErrorHTTPRedirectionLoopDetected(304L),
    ErrorHTTPBadURL(305L),
    ErrorHTTPProxyConnectionFailure(306L),
    ErrorHTTPBadProxyCredentials(307L),
    ErrorPACFileError(308L),
    ErrorPACFileAuth(309L),
    ErrorHTTPSProxyConnectionFailure(310L),
    StreamErrorHTTPSProxyFailureUnexpectedResponseToCONNECTMethod(311L),
    URLErrorBackgroundSessionInUseByAnotherProcess(-996L),
    URLErrorBackgroundSessionWasDisconnected(-997L),
    URLErrorUnknown(-998L),
    URLErrorCancelled(-999L),
    URLErrorBadURL(-1000L),
    URLErrorTimedOut(-1001L),
    URLErrorUnsupportedURL(-1002L),
    URLErrorCannotFindHost(-1003L),
    URLErrorCannotConnectToHost(-1004L),
    URLErrorNetworkConnectionLost(-1005L),
    URLErrorDNSLookupFailed(-1006L),
    URLErrorHTTPTooManyRedirects(-1007L),
    URLErrorResourceUnavailable(-1008L),
    URLErrorNotConnectedToInternet(-1009L),
    URLErrorRedirectToNonExistentLocation(-1010L),
    URLErrorBadServerResponse(-1011L),
    URLErrorUserCancelledAuthentication(-1012L),
    URLErrorUserAuthenticationRequired(-1013L),
    URLErrorZeroByteResource(-1014L),
    URLErrorCannotDecodeRawData(-1015L),
    URLErrorCannotDecodeContentData(-1016L),
    URLErrorCannotParseResponse(-1017L),
    URLErrorInternationalRoamingOff(-1018L),
    URLErrorCallIsActive(-1019L),
    URLErrorDa


}());/**
 * JustGage - a handy JavaScript plugin for generating and animating nice & clean dashboard gauges.
 * Copyright (c) 2012 Bojan Djuricic - pindjur(at)gmail(dot)com | http://www.madcog.com
 * Licensed under MIT.
 * Date: 31/07/2012
 * @author Bojan Djuricic  (@Toorshia)
 * @version 1.0
 *
 * http://www.justgage.com
 */

JustGage = function(config)
{

	if(!config.id)
	{
		alert("Missing id parameter for gauge!");
		return false;
	}
	if(!document.getElementById(config.id))
	{
		alert("No element with id: \"" + config.id + "\" found!");
		return false;
	}

	// configurable parameters
	this.config = {
		// id : string
		// this is container element id
		id                  : config.id,

		// value : int
		// value gauge is showing
		value               : (config.value) ? config.value : 0,

		// valueFontColor : string
		// color of label showing current value
		valueFontColor      : (config.valueFontColor) ? config.valueFontColor : "#010101",

		// min : int
		// min value
		min                 : (config.min) ? config.min : 0,

		// max : int
		// max value
		max                 : (config.max) ? config.max : 100,

		// showMinMax : bool
		// hide or display min and max values
		showMinMax          : (config.showMinMax != null) ? config.showMinMax : true,

		// gaugeWidthScale : float
		// width of the gauge element
		gaugeWidthScale     : (config.gaugeWidthScale) ? config.gaugeWidthScale : 1.0,

		// gaugeColor : string
		// background color of gauge element
		gaugeColor          : (config.gaugeColor) ? config.gaugeColor : "#edebeb",

		// label : string
		// text to show below value
		label               : (config.label) ? config.label : "",

		// showInnerShadow : bool
		// give gauge element small amount of inner shadow
		showInnerShadow     : (config.showInnerShadow != null) ? config.showInnerShadow : true,

		// shadowOpacity : int
		// 0 ~ 1
		shadowOpacity       : (config.shadowOpacity) ? config.shadowOpacity : 0.2,

		// shadowSize: int
		// inner shadow size
		shadowSize          : (config.shadowSize) ? config.shadowSize : 5,

		// shadowVerticalOffset : int
		// how much shadow is offset from top
		shadowVerticalOffset: (config.shadowVerticalOffset) ? config.shadowVerticalOffset : 3,

		// levelColors : string[]
		// colors of indicator, from lower to upper, in RGB format
		levelColors         : (config.levelColors) ? config.levelColors : percentColors,

		// levelColorsGradient : bool
		// whether to use gradual color change for value, or sector-based
		levelColorsGradient : (config.levelColorsGradient != null) ? config.levelColorsGradient : true,

		// labelFontColor : string
		// color of label showing label under value
		labelFontColor      : (config.labelFontColor) ? config.labelFontColor : "#b3b3b3",

		// startAnimationTime : int
		// length of initial animation
		startAnimationTime  : (config.startAnimationTime) ? config.startAnimationTime : 700,

		// startAnimationType : string
		// type of initial animation (linear, >, <,  <>, bounce)
		startAnimationType  : (


namespace Atomic.Entities
{
    /// <summary>
    /// Defines a behavior that executes logic during the fixed update cycle of an <see cref="IEntity"/>.
    /// </summary>
    /// <remarks>
    /// This method is automatically called by <see cref="ITickLifecycle.FixedTick"/> at a consistent time interval,
    /// typically aligned with the physics simulation step.
    /// </remarks>
    public interface IEntityFixedTick : IEntityBehaviour
    {
        /// <summary>
        /// Called during the fixed update phase.
        /// </summary>
        /// <param name="entity">The entity being updated.</param>
        /// <param name="deltaTime">The fixed time step since the last update.</param>
        void FixedTick(IEntity entity, float deltaTime);
    }

    /// <summary>
    /// Provides a strongly-typed version of <see cref="IEntityFixedTick"/> for handling fixed update logic
    /// on a specific <see cref="IE


o directory needed to be created
    if not existing_path then
        existing_path = tmp_path .. utils.path_separator
    end

    return { existing_path, created_path }
end

---Rename `old_element` to `new_element`
---@param old_element string
---@param new_element string
---@return string? renamed_element The new renamed element (can differ from `new_element` due to renaming) or `nil` if the element was not renamed
---@return string? error An error message in case anything did go wrong
local function rename_element(old_element, new_element)
    local old_element_stats = luv.fs_lstat(old_element)
    if not old_element_stats then
        return nil, old_element .. ' does not exist!'
    end

    if old_element == new_element then
        return nil, nil
    end

    local confirm_msg = table.concat({
        '[CONFIRM OVERWRITE]',
        'A %s named "%s" already exists in "%s"',
        "Do you want to overwrite it with the %s you're moving?",
    }, '\n')

    local second_try = false
    ::rename::
    local new_element_stats = luv.fs_lstat(new_element)
    local element_name = new_element:match(
        '.*' .. utils.path_separator .. '([^' .. utils.path_separator .. ']+)' .. utils.path_separator .. '?$'
    )
    local parent_path = new_element:sub(1, #new_element - #element_name - 1)

    -- `fs_rename` does not fail on existing files and would just overwrite them, so we have to check manually
    if new_element_stats and new_element_stats.type ~= 'directory' and old_element_stats.type ~= 'directory' then
        local action = vim.fn.confirm(
            confirm_msg:format(new_element_stats.type, element_name, parent_path, old_element_stats.type),
            '&Yes\n&No\n&Rename',
            2
        )
        vim.cmd('redraw') -- clear input area

        if action == 0 or action == 2 then
            return nil, nil
        end

        if action == 3 then
            new_element = vim.fn.input('New name: ', new_element)
            goto rename
        end
    end

    create_directories(new_element)

    local success, error = luv.fs_rename(old_element, new_element)
    if success then
        -- if renaming a directory attach the path separator to make sure buffer renaming is working correctly
        if old_element_stats.type == 'directory' then
            if not vim.endswith(old_element, utils.path_separator) then
                old_element = old_element .. utils.path_separator
            end
            if not vim.endswith(new_element, utils.path_separator) then
                new_element = new_element .. utils.path_separator
            end
        end
        rename_loaded_buffers(old_element, new_element)
        return new_element, nil
    elseif not second_try then
        local action = 0
        if vim.startswith(error, 'ENOTDIR') or vim.startswith(error, 'EISDIR') then
            action = vim.fn.confirm(
                confirm_msg:format(new_element_stats.type, element_name, parent_path, old_element_stats.type),
                '&Yes\n&No\n&Rename',
                2
            )
        elseif vim.startswith(error, 'ENOTEMPTY') then
            action = vim.fn.confirm(
                -- clarify that it's NOT a merge but an overwrite (old data will be lost)
                confirm_msg:format(new_element_stats.type, element_name, parent_path, old_element_stats.type)
                    .. ' (This is NOT a merge!)


, 在岩石上发现的",
"rupestrine":"a. 生长在岩石上的, 生长(居住)在岩石丛中的",
"rupestrine plant":" 石生植物",
"rupestris":" [医]岩石的，石生的",
"Ruphos":"敌杀磷",
"rupia":"[医] 蛎壳疮, 蛎壳疹",
"rupia escharotica":"[医] 焦痂性蛎壳疮, 婴儿坏疽性皮炎",
"rupiah":"n. 卢比(印尼货币单位)",
"rupiahs":"(rupiah 的复数) n. 卢比(印尼货币单位)",
"rupial":"[医] 蛎壳疮的",
"rupial syphilid":"[医] 梅毒性蛎壳疮",
"Rupicapra":"岩羚羊属",
"Rupicapra rupicapra":"[网络] 岩羚羊；臆羚；臆羚属",
"Rupicaprini":"岩羚羊族; 羊羚族",
"Rupicola":"[网络] 动冠伞鸟属；竹柏石南属；多色杜鹃",
"Rupicola peruviana":"[网络] 安第斯冠伞鸟；安第斯动冠伞鸟",
"Rupicola rupicola":"[网络] 动冠伞鸟",
"rupicoline":"a. 生长在岩石上的, 生长(居住)在岩石丛中的",
"rupicolous":"a. 生长在岩石丛中的",
"rupicolous plant":" 石生植物",
"rupideserta":"石质荒漠群落",
"rupioid":"[医] 蛎壳疮样的",
"rupp":"n. (Rupp)人名；(英、德、意、匈、瑞典)鲁普\\nabbr. 柬埔寨皇家金边大学（Royal University of Phnom Penh in Cambodia）",
"ruppe":" [人名] 鲁普",
"ruppel":" [人名] 拉佩尔",
"Ruppell's serum":"[医] 腊佩耳氏血清(抗脑膜炎球菌血清)",
"ruppenthal":" [人名] 鲁彭索尔",
"ruppert":" [人名] 鲁珀特",
"rupphobia":"[医] 不洁恐怖",
"ruppin":" [人名] 鲁平",
"ruprecht":"n. (Ruprecht)人名；(德、捷)鲁普雷希特",
"ruptime":"[计] 网络命令",
"ruptio":"[医] 破裂",
"ruptura":" [医]破裂",
"rupture":"n. 破裂, 断裂, 裂开, 决裂, 不和\\nv. (使)破裂",
"rupture capacity":"[电] 启断容量",
"rupture diaphragm":"[化] 防爆膜",
"rupture disk":"[化] 爆破膜; 爆破片; 防爆膜",


656 L125.4473 -8.3906 L125.4473 -6.2188 L126.5098 -6.2188 L126.5098 -5.4062 L125.4473 -5.4062 L125.4473 -1.7656 Q125.4473 -1.3125 125.4941 -1.1875 Q125.5566 -1.0625 125.6816 -0.9844 Q125.8066 -0.9062 126.041 -0.9062 Q126.2285 -0.9062 126.5098 -0.9375 ZM131.7969 -2 L132.8906 -1.875 Q132.6406 -0.9219 131.9375 -0.3906 Q131.2344 0.1406 130.1562 0.1406 Q128.7969 0.1406 127.9844 -0.7031 Q127.1875 -1.5469 127.1875 -3.0625 Q127.1875 -4.625 128 -5.4844 Q128.8125 -6.3594 130.0938 -6.3594 Q131.3438 -6.3594 132.125 -5.5156 Q132.9219 -4.6719 132.9219 -3.125 Q132.9219 -3.0312 132.9219 -2.8438 L128.2812 -2.8438 Q128.3438 -1.8125 128.8594 -1.2656 Q129.375 -0.7344 130.1562 -0.7344 Q130.7344 -0.7344 131.1406 -1.0312 Q131.5625 -1.3438 131.7969 -2 ZM128.3438 -3.7031 L131.8125 -3.7031 Q131.75 -4.5 131.4219 -4.8906 Q130.9062 -5.5 130.1094 -5.5 Q129.375 -5.5 128.875 -5.0156 Q128.3906 -4.5312 128.3438 -3.7031 ZM134.9082 2.5312 L134.1582 2.5312 Q135.9082 -0.2812 135.9082 -3.1094 Q135.9082 -4.2031 135.6582 -5.2969 Q135.4551 -6.1719 135.0957 -6.9844 Q134.8613 -7.5 134.1582 -8.7344 L134.9082 -8.7344 Q136.002 -7.2656 136.5332 -5.7812 Q136.9863 -4.5 136.9863 -3.1094 Q136.9863 -1.5312 136.377 -0.0469 Q135.7676 1.4219 134.9082 2.5312 Z" style="stroke:none; clip-path:url(#clipPath13_8c6cd89e-2e51-4e58-a263-1301f42344d9);"/></g><g style="font-family:sans-serif; text-rendering:optimizeLegibility;" transform="matrix(1.3333,0,0,1.3333,-10.8995,85.4583)"><line x1="431.5" x2="312.9949" y1="628.9919" style="fill:none; clip-path:url(#clipPath2_8c6cd89e-2e51-4e58-a263-1301f42344d9);" y2="628.9919"/><polygon style="clip-path:url(#clipPath2_8c6cd89e-2e51-4e58-a263-1301f42344d9); stroke:none;" points=" 313 629 324 635 324 622"/><polygon style="fill:none; clip-path:url(#clipPath2_8c6cd89e-2e51-4e58-a263-1301f42344d9);" points=" 313 629 324 635 324 622"/><line x1="


// Advance 推进事件
func (e *EventPool) Advance(id int) {
	p := e.handlerById(id)
	p.poller.advance()
}

func (e *EventPool) handlerById(id int) *pushHandler {

	return e.handlers[id-1]
}
package phpserialize

import (
	"bytes"
	"fmt"
	"strconv"
)

func Encode(value interface{}) (result string, err error) {
	buf := new(bytes.Buffer)
	err = encodeValue(buf, value)
	if err == nil {
		result = buf.String()
	}
	return
}

func encodeValue(buf *bytes.Buffer, value interface{}) (err error) {
	switch t := value.(type) {
	default:
		err = fmt.Errorf("Unexpected type %T", t)
	case bool:
		buf.WriteString("b")
		buf.WriteRune(TYPE_VALUE_SEPARATOR)
		if t {
			buf.WriteString("1")
		} else {
			buf.WriteString("0")
		}
		buf.WriteRune(VALUES_SEPARATOR)
	case nil:
		buf.WriteString("N")
		buf.WriteRune(VALUES_SEPARATOR)
	case int, int64, int32, int16, int8:
		buf.WriteString("i")
		buf.WriteRune(TYPE_VALUE_SEPARATOR)
		strValue := fmt.Sprintf("%v", t)
		buf.WriteString(strValue)
		buf.WriteRune(VALUES_SEPARATOR)
	case float32:
		buf.WriteString("d")
		buf.WriteRune(TYPE_VALUE_SEPARATOR)
		strValue := strconv.FormatFloat(float64(t), 'f', -1, 64)
		buf.WriteString(strValue)
		buf.WriteRune(VALUES_SEPARATOR)
	case float64:
		buf.WriteString("d")
		buf.WriteRune(TYPE_VALUE_SEPARATOR)
		strValue := strconv.FormatFloat(float64(t), 'f', -1, 64)
		buf.WriteString(strValue)
		buf.WriteRune(VALUES_SEPARATOR)
	case string:
		buf.WriteString("s")
		buf.WriteRune(TYPE_VALUE_SEPARATOR)
		encodeString(buf, t)
		buf.WriteRune(VALUES_SEPARATOR)
	case map[interface{}]interface{}:
		buf.WriteString("a")
		buf.WriteRune(TYPE_VALUE_SEPARATOR)
		err = encodeArrayCore(buf, t)
	case *PhpObject:
		buf.WriteString("O")
		buf.WriteRune(TYPE_VALUE_SEPARATOR)
		encodeString(buf, t.GetClassName())
		buf.WriteRune(TYPE_VALUE_SEPARATOR)
		err = encodeArrayCore(buf, t.GetMembers())
	}
	return
}

func encodeString(buf *bytes.Buffer, strValue string) {
	valLen := strconv.Itoa(len(strValue))
	buf.WriteString(valLen)
	buf.WriteRune(TYPE_VALUE_SEPARATOR)
	buf.WriteRune('"')
	buf.WriteString(strValue)
	buf.WriteRune('"')
}

func encodeArrayCore(buf *bytes.Buffer, arrValue map[interface{}]interface{}) (err error) {
	valLen := strconv.Itoa(len(arrValue))
	buf.WriteString(valLen)
	buf.WriteRune(TYPE_VALUE_SEPARATOR)

	buf.WriteRune('{')
	for k, v := range arrValue {
		if intKey, _err := strconv.Atoi(fmt.Sprintf("%v", k)); _err == nil {
			if err = encodeValue(buf, intKey); err != nil {
				break
			}
		} else {
			if err = encodeValue(buf


    //
    // One way to portably do it would be
    //
    //      #define ROL(x, n)        (((x) << (n)) | ((x) >> (32-(n))))
    //      #define ROTATE_LEFT(x,n) (x) = ROL(x,n)
    //
    // but our compiler has an intrinsic!

    #if defined(TARGET_WINDOWS)
        #define ROTATE_LEFT(x, n) (x) = _lrotl(x, n)
    #elif __has_builtin(__builtin_rotateleft)
        #define ROTATE_LEFT(x, n) ((x) = __builtin_rotateleft(x, n))
    #else
        #define ROTATE_LEFT(x, n) ((x) = ((x << (n)) | (x >> (sizeof(x) * 8 - (n)))))
    #endif

    ////////////////////////////////////////////////////////////////
    //
    // Constants used in each of the various rounds

    #define MD5_S11 7
    #define MD5_S12 12
    #define MD5_S13 17
    #define MD5_S14 22
    #define MD5_S21 5
    #define MD5_S22 9
    #define MD5_S23 14
    #define MD5_S24 20
    #define MD5_S31 4
    #define MD5_S32 11
    #define MD5_S33 16
    #define MD5_S34 23
    #define MD5_S41 6
    #define MD5_S42 10
    #define MD5_S43 15
    #define MD5_S44 21

    ////////////////////////////////////////////////////////////////
    //
    // The core twiddle functions

//  #define F(x, y, z) (((x) & (y)) | ((~x) & (z)))         // the function per the standard
    #define F(x, y, z) ((((z) ^ (y)) & (x)) ^ (z))          // an alternate encoding

//  #define G(x, y, z) (((x) & (z)) | ((y) & (~z)))         // the function per the standard
    #define G(x, y, z) ((((x) ^ (y)) & (z)) ^ (y))          // an alternate encoding

    #define H(x, y, z) ((x) ^ (y) ^ (z))

    #define I(x, y, z) ((y) ^ ((x) | (~(z))))

    #define AC(ac)  ((ULONG)(ac))

    ////////////////////////////////////////////////////////////////

    #define FF(a, b, c, d, x, s, ac) { \
        (a) += F (b,c,d) + (x) + (AC(ac)); \
        ROTATE_LEFT (a, s); \
        (a) += (b); \
        }

    ////////////////////////////////////////////////////////////////

    #define GG(a, b, c, d, x, s, ac) { \
        (a) += G (b,c,d) + (x) + (AC(ac)); \
        ROTATE_LEFT (a, s); \
        (a) += (b); \
        }

    ////////////////////////////////////////////////////////////////

    #define HH(a, b, c, d, x, s, ac) { \
        (a) += H (b,c,d) + (x) + (AC(ac)); \
        ROTATE_LEFT (a, s); \
        (a) += (b); \
        }

    ////////////////////////////////////////////////////////////////

    #define II(a, b, c, d, x, s, ac) { \
        (a) += I (b,c,d) + (x) + (AC(ac)); \
        ROTATE_LEFT (a, s); \
        (a) += (b); \
        }

    void __stdcall MD5Transform(ULONG state[4], const ULONG* data)
        {
        STATIC_CONTRACT_NOTHROW;
        STATIC_CONTRACT_GC_NOTRIGGER;

        _ASSERTE(IS_ALIGNED(data, sizeof(ULONG)));

        ULONG a=state[0];
        ULONG b=state[1];
        ULONG c=state[2];
        ULONG d=state[3];

        // Round 1
        FF (a, b, c, d, data[ 0], MD5_S11, 0xd76aa478); // 1
        FF (d, a, b, c, data[ 1], MD5_S12, 0xe8c7b756


, description=None, version='1.0.0', attribution=None, minzoom=1, maxzoom=2, quadkey_zoom=1, bounds=[-180.0, -90.0, 180.0, 90.0], center=(0.0, 0.0, 1), tiles={})
```

```python
# convert the mode to a dict
m.dict(exclude_none=True)
> {'mosaicjson': '0.0.2',
 'version': '1.0.0',
 'minzoom': 1,
 'maxzoom': 2,
 'quadkey_zoom': 1,
 'bounds': [-180.0, -90.0, 180.0, 90.0],
 'center': (0.0, 0.0, 1),
 'tiles': {}}
```

```python
mosaic_definition = dict(
    mosaicjson="0.0.2",
    minzoom=1,
    maxzoom=100,
    quadkey_zoom=1,
    bounds=[-180, -90, 180, 90],
    center=(0, 0, 1),
    tiles={},
)

m = MosaicJSON(**mosaic_definition)
...
ValidationError: 1 validation error for MosaicJSON
maxzoom
  ensure this value is less than or equal to 30 (type=value_error.number.not_le; limit_value=30)
```

### Creation

The `MosaicJSON` class comes also with helper functions:
- **MosaicJSON.from_urls**: Create a mosaicjson from a set of COG urls
- **MosaicJSON.from_features**: Create a mosaicjson from a set of GeoJSON features
- **MosaicJSON._create_mosaic** (semi-private): Low level mosaic creation methods used by public methods (`from_urls` and `from_features`).

```python
#V2
from cogeo_mosaic.utils import create_mosaic

mosaic_definition: Dict = create_mosaic(dataset)

#V3
from cogeo_mosaic.mosaic import MosaicJSON

mosaic_definition: MosaicJSON = MosaicJSON.from_urls(dataset)

# or from a list of GeoJSON Features
mosaic_definition: MosaicJSON = MosaicJSON.from_features(dataset, minzoom=1, maxzoom=3)
```

To learn more about the low-level api checkout [/docs/AdvancedTopics.md](/docs/AdvancedTopics.md)

### Backend Storage

#### Read
```python
# V2
from cogeo_mosaic.utils import (
    fetch_mosaic_definition,
    fetch_and_find_assets,
    fetch_and_find_assets_point,
)
mosaic_definition = fetch_mosaic_definition(url)
assets = fetch_and_find_assets(url, x, y, z)
assets = fetch_and_find_assets_point(url, lng, lat)

# V3
from cogeo_mosaic.backends import MosaicBackend

with MosaicBackend(url) as mosaic:
    mosaic_definition = mosaic.mosaic_def
    assets = mosaic.tile(x, y, z)    # LRU cache
    assets = mosaic.point(lng, lat)  # LRU cache
```

#### Write
```python

#V2
from cogeo_mosaic.utils import create_mosaic
from boto3.session import Session as boto3_session

mosaic_definition = create_mosaic(dataset)

def _compress_gz_json(data):
    gzip_compress = zlib.compressobj(9, zlib.DEFLATED, zlib.MAX_WBITS | 16)

    return (
        gzip_compress.compress(json.dumps(data).encode("utf-8")) + gzip_compress.flush()
    )

session = boto3_session()
client = session.client("s3")
client.put_object(
    Bucket=bucket,
    Key=key,
    Body=_compress_gz_json(mosaic_definition),
)

#V3
from cogeo_mosaic.mosaic import MosaicJSON

mosaic_definition = MosaicJSON.from_urls(dataset)

with MosaicBackend("s3://{bucket}/{key}", mosaic_def=mosaic_definition) as mosaic:
    mosaic.write()
```


ption" content="キーワード最適化から技術的な詳細まで、ページSEOのすべてを学び、ウェブサイトのランキングを向上させましょう！">`）

2.  **リンク:**
    *   **内部リンク:** 自分のウェブサイト内の他の関連ページへのリンクを張ります。ピラミッド構造にするのが理想的です。孤立したページを残さないようにしましょう。Googleが見つけられなくなってしまいます。（例：`<a href="/keyword-research">キーワード調査について学ぶ</a>`）
    *   **外部リンク:** （必要な場合）信頼できる情報源や役立つ外部リソースへのリンクを張ります。（例：`<a href="https://example.com" rel="nofollow">参考文献</a>`）

3.  **画像:**
    *   **ファイル名:** 説明的な名前を使用します。（例：`page-seo-checklist.jpg`）
    *   **代替テキスト (Alt Text):** 画像の内容を説明する代替テキストを追加します。（例：`<img src="..." alt="ページSEOチェックリストのスクリーンショット">`）
    *   **圧縮:** 画像ファイルのサイズを圧縮して、読み込み速度を向上させます。

4.  **URL:**
    *   **簡潔な説明:** URLパスは短く、わかりやすく、キーワードを含むことが理想的です（英語の場合は「-」で区切ります）。（例：`/page-seo-guide/`）

5.  **ユーザーエクスペリエンス:**
    *   **ページ速度 (Core Web Vitals):** 読み込み速度を最適化します。
    *   **モバイルフレンドリー:** スマートフォンで快適に閲覧できるようにします。
    *   **HTTPS:** HTTPS暗号化を使用します。
    *   **邪魔な要素を排除:** 過剰なポップアップ広告を避けます。
    *   **(オプション) 强调表示の最適化:** 簡潔で的を絞った回答を提供します。
    *   **(オプション) Schemaマークアップ:** 構造化データを追加して、Googleがコンテンツを理解するのを助けます。

### 4. 外部リンクを獲得する

1.  **質の高いコンテンツを作成：** 特に優れた、非常に役立つコンテンツを作成し、他の人があなたの記事を引用したり、あなたのツールを推奨したくなるように努力します。（これが最も重要で持続可能な方法です）
2.  **ディレクトリに登録：** あなたのウェブサイトを、最も重要で権威のある


(&p0.get_Raw(), &p0.get_Raw(), &ge);

		verify_test(p0 == Zero);
	}

	// bringing to the same denominator
	memcpy(reinterpret_cast<void*>(bctx.m_pPtsBuf), pPts, sizeof(pPts));

	secp256k1_fe zDen;
	bctx.ToCommonDenominator(zDen);

	// test. Points brought to the same denominator can be added as if they were normalized, and only the final result should account for the denominator
	p0 = Zero;
	p1 = Zero;
	for (uint32_t i = 0; i < nBatch; i++)
	{
		p1 += pPts[i];

		// treat the normalized point as affine
		secp256k1_ge ge;
		bctx.get_As(ge, bctx.m_pPts[i]);

		secp256k1_gej_add_ge(&p0.get_Raw(), &p0.get_Raw(), &ge);
	}

	secp256k1_fe_mul(&p0.get_Raw().z, &p0.get_Raw().z, &zDen);

	p0 = -p0;
	p0 += p1;
	verify_test(p0 == Zero);
}

void TestSigning()
{
	for (int i = 0; i < 30; i++)
	{
		Scalar::Native sk; // private key
		SetRandom(sk);

		Point::Native pk; // public key
		pk = Context::get().G * sk;

		Signature mysig;

		uintBig msg;
		SetRandom(msg); // assumed message

		mysig.Sign(msg, sk);

		verify_test(mysig.IsValid(msg, pk));

		Point::Native pk_rec;
		verify_test(mysig.RecoverPubKey(Context::get().m_Sig.m_CfgG1, msg, &mysig.m_k, nullptr, 0, pk_rec));
		verify_test(pk_rec == pk);

		// tamper msg
		uintBig msg2 = msg;
		msg2.Inc();

		verify_test(!mysig.IsValid(msg2, pk));

		// try to sign with different key
		Scalar::Native sk2;
		SetRandom(sk2);

		Signature mysig2;
		mysig2.Sign(msg, sk2);
		verify_test(!mysig2.IsValid(msg, pk));

		// tamper signature
		mysig2 = mysig;
		mysig2.m_NoncePub.m_Y = !mysig2.m_NoncePub.m_Y;
		verify_test(!mysig2.IsValid(msg, pk));

		mysig2 = mysig;
		SetRandom(mysig2.m_k.m_Value);
		verify_test(!mysig2.IsValid(msg, pk));
	}

	// generalized sigs
	{
		const uint32_t nGens = 2;
		const uint32_t nKeys = 5; // per generator

		SignatureBase::Config cfg;
		cfg.m_nKeys = nKeys;
		cfg.m_nG = nGens;
		cfg.m_pG = Context::get().m_Sig.m_pGenGH;

		Point::Native pPk[nKeys];
		Scalar::Native pSk[nGens * nKeys];

		for (uint32_t iKey = 0; iKey < nKeys; iKey++)
		{
			auto& pk = pPk[iKey];

			for (uint32_t iGen = 0; iGen < nGens; iGen++)
			{
				auto& sk = pSk[iKey * nGens + iGen];
				SetRandom(sk);

				const auto& g = cfg.m_pG[iGen];
				if (g.m_pGen_s)
					pk += (*g.m_pGen_s) * sk;
				else
					pk += (*g.m_pGen_f) * sk;
			}
		}

		Scalar::Native pNnc[nGens]; // nonces

		uintBig msg;
		SetRandom(msg


.*$", {
    "abcdefghijklmnopqrstuvwxyz".to_owned()
});

bench_match!(one_pass_long_prefix_not, r"^.bcdefghijklmnopqrstuvwxyz.*$", {
    "abcdefghijklmnopqrstuvwxyz".to_owned()
});

bench_match!(long_needle1, r"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaab", {
    repeat("a").take(100_000).collect::<String>() + "b"
});

bench_match!(long_needle2, r"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbba", {
    repeat("b").take(100_000).collect::<String>() + "a"
});

// This benchmark specifically targets the "reverse suffix literal"
// optimization. In particular, it is easy for a naive implementation to
// take quadratic worst case time. This benchmark provides a case for such
// a scenario.
bench_not_match!(reverse_suffix_no_quadratic, r"[r-z].*bcdefghijklmnopq", {
    repeat("bcdefghijklmnopq").take(500).collect::<String>()
});

#[cfg(feature = "re-rust")]
#[bench]
fn replace_all(b: &mut Bencher) {
    let re = regex!("[cjrw]");
    let text = "abcdefghijklmnopqrstuvwxyz";
    b.iter(|| re.replace_all(text, ""));
}

const TXT_32: &'static str = include_str!("data/32.txt");
const TXT_1K: &'static str = include_str!("data/1K.txt");
const TXT_32K: &'static str = include_str!("data/32K.txt");
const TXT_1MB: &'static str = include_str!("data/1MB.txt");

fn get_text(corpus: &str, suffix: String) -> String {
    let mut corpus = corpus.to_string();
    corpus.push_str(&suffix);
    corpus
}

fn easy0_suffix() -> String {
    "ABCDEFGHIJKLMNOPQRSTUVWXYZ".to_string()
}

macro_rules! easy0 { () => ("ABCDEFGHIJKLMNOPQRSTUVWXYZ$") }

bench_match!(easy0_32, easy0!(), get_text(TXT_32, easy0_suffix()));
bench_match!(easy0_1K, easy0!(), get_text(TXT_1K, easy0_suffix()));
bench_match!(easy0_32K, easy0!(), get_text(TXT_32K, easy0_suffix()));
bench_match!(easy0_1MB, easy0!(), get_text(TXT_1MB, easy0_suffix()));

fn easy1_suffix() -> String {
    "AABCCCDEEEFGGHHHIJJ".to_string()
}

macro_rules! easy1 {
    () => (r"A[AB]B[BC]C[CD]D[DE]E[EF]F[FG]G[GH]H[HI]I[IJ]J$")
}

bench_match!(easy1_32, easy1!(), get_text(TXT_32, easy1_suffix()));
bench_match!(easy1_1K, easy1!(), get_text(TXT_1K, easy1_suffix()));
bench_match!(easy1_32K, easy1!(), get_text(TXT_32K, easy1_suffix()));
bench_match!(easy1_1MB, easy1!(), get_text(TXT_1MB, easy1_suffix()));

fn medium_suffix() -> String {
    "XABCDEFGHIJKLMNOPQRSTUVWXYZ".to_string()
}

macro_rules! medium { () => (r"[XYZ]ABCDEFGHIJKLMNOPQRSTUVWXYZ$") }

bench_match!(medium_32, medium!(), get_text(TXT_32, medium_suffix()));
bench_match!(medium_1K, medium!(), get_text(TXT_1K, medium_suffix()));
bench_


    /// Child status has changed (POSIX)
    SIGCHLD = 0x11,
    /// Continue (POSIX)
    SIGCONT = 0x12,
    /// Stop, unblockable (POSIX)
    SIGSTOP = 0x13,
    /// Keyboard stop (POSIX)
    SIGTSTP = 0x14,
    /// Background read from tty (POSIX)
    SIGTTIN = 0x15,
    /// Background write to tty (POSIX)
    SIGTTOU = 0x16,
    /// Urgent condition on socket (4.2 BSD)
    SIGURG = 0x17,
    /// CPU limit exceeded (4.2 BSD)
    SIGXCPU = 0x18,
    /// File size limit exceeded (4.2 BSD)
    SIGXFSZ = 0x19,
    /// Virtual alarm clock (4.2 BSD)
    SIGVTALRM = 0x1a,
    /// Profiling alarm clock (4.2 BSD)
    SIGPROF = 0x1b,
    /// Window size change (4.3 BSD, Sun)
    SIGWINCH = 0x1c,
    /// I/O now possible (4.2 BSD)
    SIGIO = 0x1d,
    /// Power failure restart (System V)
    SIGPWR = 0x1e,
    /// Bad system call
    SIGSYS = 0x1f,
    /// No exception, dump requested
    DUMP_REQUESTED = 0xffffffff,
}

/// Values for [`MINIDUMP_EXCEPTION::exception_code`] for crashes on macOS
///
/// Based on Darwin/macOS' mach/exception_types.h. This is what macOS calls an "exception",
/// not a "code".
#[repr(u32)]
#[derive(Copy, Clone, PartialEq, Debug, Primitive)]
pub enum ExceptionCodeMac {
    /// code can be a kern_return_t
    EXC_BAD_ACCESS = 1,
    /// code is CPU-specific
    EXC_BAD_INSTRUCTION = 2,
    /// code is CPU-specific
    EXC_ARITHMETIC = 3,
    /// code is CPU-specific
    EXC_EMULATION = 4,
    EXC_SOFTWARE = 5,
    /// code is CPU-specific
    EXC_BREAKPOINT = 6,
    EXC_SYSCALL = 7,
    EXC_MACH_SYSCALL = 8,
    EXC_RPC_ALERT = 9,
    /// Fake exception code used by Crashpad's SimulateCrash ('CPsx')
    SIMULATED = 0x43507378,
}

/// Valid bits in a `context_flags` for [`ContextFlagsCpu`]
pub const CONTEXT_CPU_MASK: u32 = 0xffffff00;

bitflags! {
    /// CPU type values in the `context_flags` member of `CONTEXT_` structs
    ///
    /// This applies to the [`CONTEXT_ARM`], [`CONTEXT_PPC`], [`CONTEXT_MIPS`],
    /// [`CONTEXT_AMD64`], [`CONTEXT_ARM64`], [`CONTEXT_PPC64`], [`CONTEXT_SPARC`] and
    /// [`CONTEXT_ARM64_OLD`] structs.
    pub struct ContextFlagsCpu: u32 {
        const CONTEXT_IA64 = 0x80000;
        /// Super-H, includes SH3, from winnt.h in the Windows CE 5.0 SDK
        const CONTEXT_SHX = 0xc0;
        /// From winnt.h in the Windows CE 5.0 SDK, no longer used
        ///
        /// Originally used by Breakpad but changed after conflicts with other context
        /// flag bits.
        const CONTEXT_ARM_OLD = 0x40;
        /// Alpha, from winnt.h in the Windows CE 5.0 SDK
        const CONTEXT_ALPHA = 0x20000;
        const CONTEXT_


minutes = fixed_width_column_wrapper<int16_t>{
    {33, 26, 20, 13, 6, 0, 53, 46, 40, 33},
    {true, false, true, false, true, false, true, false, true, false}};
  auto expected_seconds = fixed_width_column_wrapper<int16_t>{
    {20, 40, 0, 20, 40, 0, 20, 40, 0, 20},
    {true, false, true, false, true, false, true, false, true, false}};

  // Special cases for timestamp_D: zero out the expected hh/mm/ss cols
  if (std::is_same_v<TypeParam, cudf::timestamp_D>) {
    expected_hours = fixed_width_column_wrapper<int16_t>{
      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
      {true, false, true, false, true, false, true, false, true, false}};
    expected_minutes = fixed_width_column_wrapper<int16_t>{
      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
      {true, false, true, false, true, false, true, false, true, false}};
    expected_seconds = fixed_width_column_wrapper<int16_t>{
      {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
      {true, false, true, false, true, false, true, false, true, false}};
  }

  CUDF_TEST_EXPECT_COLUMNS_EQUAL(
    *extract_datetime_component(timestamps, cudf::datetime::datetime_component::YEAR),
    expected_years);
  CUDF_TEST_EXPECT_COLUMNS_EQUAL(
    *extract_datetime_component(timestamps, cudf::datetime::datetime_component::MONTH),
    expected_months);
  CUDF_TEST_EXPECT_COLUMNS_EQUAL(
    *extract_datetime_component(timestamps, cudf::datetime::datetime_component::DAY),
    expected_days);
  CUDF_TEST_EXPECT_COLUMNS_EQUAL(
    *extract_datetime_component(timestamps, cudf::datetime::datetime_component::WEEKDAY),
    expected_weekdays);
  CUDF_TEST_EXPECT_COLUMNS_EQUAL(
    *extract_datetime_component(timestamps, cudf::datetime::datetime_component::HOUR),
    expected_hours);
  CUDF_TEST_EXPECT_COLUMNS_EQUAL(
    *extract_datetime_component(timestamps, cudf::datetime::datetime_component::MINUTE),
    expected_minutes);
  CUDF_TEST_EXPECT_COLUMNS_EQUAL(
    *extract_datetime_component(timestamps, cudf::datetime::datetime_component::SECOND),
    expected_seconds);
}

TEST_F(BasicDatetimeOpsTest, TestLastDayOfMonthWithSeconds)
{
  using namespace cudf::test;
  using namespace cudf::datetime;
  using namespace cuda::std::chrono;

  // Time in seconds since epoch
  // Dates converted using epochconverter.com
  auto timestamps_s = fixed_width_column_wrapper<cudf::timestamp_s, cudf::timestamp_s::rep>{
    662688000L,   // 1991-01-01 00:00:00 GMT
    949496401L,   // 2000-02-02 13:00:01 GMT - leap year
    4106854801L,  // 2100-02-21 01:00:01 GMT - not a leap year
    1582391837L,  // 2020-02-22 17:17:17 GMT - leap year
    1363046401L,  // 2013-03-12 00:00:01 GMT
    1302696000L,  // 2011-04-13 12:00:00 GMT
    1495800001L,  // 2017-05-26 12:00:01 GMT
    1056931201L,  // 2003-06-30 00:00:01 GMT - alrea


{"多兰纳尔的塔隆凯·捷根要你杀掉7个瘤背秘法师，并找到遗失的珠宝。"}},
[2460] = {"碎手军礼", nil, {"对着申苏尔练习碎手军礼。"}},
[2478] = {"基本不可能的任务", nil, {"从工头希里克斯那里偷出希里克斯的塔楼钥匙，进入塔楼，然后杀掉两个变异风险投资公司工人、两个风险投资公司巡逻员、两个风险投资公司看守。\n\n杀掉大工头普兹克·加里维克斯，取得他的徽记，然后打开加里维克斯的箱子，拿走赞吉尔的改良药剂。将药剂和加里维克斯的徽记交给奥格瑞玛的申苏尔，等候进一步的指示。"}},
[2479] = {"希诺特的帮助", nil, {"到希尔斯布莱德丘陵的塔伦米尔去，把赞吉尔的药剂样品交给瑟尔格·希诺特。\n\n要去塔伦米尔，可以搭乘飞艇到幽暗城，然后沿着大路向南穿过银松森林，直到希尔斯布莱德丘陵。跟着路标走！"}},
[2480] = {"希诺特的帮助", nil, {"等待瑟尔格·希诺特完成解药。"}},
[2498] = {"向德纳兰回报", nil, {"雷利亚·绿树要你和奥拉密斯湖的德纳兰谈一谈。"}},
[2499] = {"奥肯斯古尔", nil, {"奥拉密斯湖的德纳兰要你去拿到奥肯斯古尔身上的巨大的瘤。"}},
[2500] = {"荒芜之地的材料", nil, {"从荒芜之地拿到加克所需的材料，然后回到塞尔萨玛去见他。"}},
[2501] = {"荒芜之地的材料 II", nil, {"在荒芜之地的守护火龙身上使用空的魔瓶。将这些容器都盛满之后，把它们交给塞尔萨玛的加克。"}},
[2518] = {"月神的泪水", nil, {"达纳苏斯月神殿的女祭司艾茉拉让你把萨丝拉的银色丝囊交给她。"}},
[2519] = {"月神殿", nil, {"艾奎恩妮让你和月神殿的女祭司艾茉拉谈一谈。"}},
[2520] = {"萨丝拉的祭品", nil, {"女祭司艾茉拉让你将萨丝拉的银色丝�