		ginkgo.By(fmt.Sprintf("Inject log to trigger DockerHung on node %q", host))
			log := "INFO: task docker:12345 blocked for more than 120 seconds."
			injectLogCmd := "sudo sh -c \"echo 'kernel: " + log + "' >> /dev/kmsg\""
			result, err = e2essh.SSH(ctx, injectLogCmd, host, framework.TestContext.Provider)
			framework.ExpectNoError(err)
			gomega.Expect(result.Code).To(gomega.Equal(0))
		}

		ginkgo.By("Gather node-problem-detector cpu and memory stats")
		numIterations := 60
		for i := 1; i <= numIterations; i++ {
			for j, host := range hosts {
				if isStandaloneMode[host] {
					rss, workingSet := getMemoryStat(ctx, f, host)
					rssStats[host] = append(rssStats[host], rss)
					workingSetStats[host] = append(workingSetStats[host], workingSet)
					if i == numIterations {
						cpuUsage, uptime := getCPUStat(ctx, f, host)
						cpuUsageStats[host] = append(cpuUsageStats[host], cpuUsage)
						uptimeStats[host] = append(uptimeStats[host], uptime)
					}
				} else {
					cpuUsage, rss, workingSet := getNpdPodStat(ctx, f, nodes[j].Name)
					cpuUsageStats[host] = append(cpuUsageStats[host], cpuUsage)
					rssStats[host] = append(rssStats[host], rss)
					workingSetStats[host] = append(workingSetStats[host], workingSet)
				}
			}
			time.Sleep(time.Second)
		}

		cpuStatsMsg := "CPU (core):"
		rssStatsMsg := "RSS (MB):"
		workingSetStatsMsg := "WorkingSet (MB):"
		for i, host := range hosts {
			if isStandaloneMode[host] {
				// When in standalone mode, NPD is running as systemd service. We
				// calculate its cpu usage from cgroup cpuacct value differences.
				cpuUsage := cpuUsageStats[host][1] - cpuUsageStats[host][0]
				totaltime := uptimeStats[host][1] - uptimeStats[host][0]
				cpuStatsMsg += fmt.Sprintf(" %s[%.3f];", nodes[i].Name, cpuUsage/totaltime)
			} else {
				sort.Float64s(cpuUsageStats[host])
				cpuStatsMsg += fmt.Sprintf(" %s[%.3f|%.3f|%.3f];", nodes[i].Name,
					cpuUsageStats[host][0], cpuUsageStats[host][len(cpuUsageStats[host])/2], cpuUsageStats[host][len(cpuUsageStats[host])-1])
			}

			sort.Float64s(rssStats[host])
			rssStatsMsg += fmt.Sprintf(" %s[%.1f|%.1f|%.1f];", nodes[i].Name,
				rssStats[host][0], rssStats[host][len(rssStats[host])/2], rssStats[host][len(rssStats[host])-1])

			sort.Float64s(workingSetStats[host])
			workingSetStatsMsg += fmt.Sprintf(" %s[%.1f|%.1f|%.1f];", nodes[i].Name,
				workingSetStats[host][0], workingSetStats[host][len(workingSetStats[host])/2], workingSetStats[host][len(workingSetStats[host])-1])
		}
		framework.Logf("Node-Problem-Detector CPU and Memory Stats:\n\t%s\n\t%s\n\t%s", cpuStatsMsg, rssStatsMsg, workingSetStatsMsg)

		ginkgo.By("Check node-problem-detector can post conditions and events to API server")
		for _, node := range nodes {
			ginkgo.By(fmt.Sprintf("Check node-problem-detector posted KernelDeadlock condition on node %q", node.Name))
			gomega.Eventually(ctx, func() error {
				return verifyNodeCondition(ctx, f, "KernelDeadlock", v1.ConditionTrue, "DockerHung", node.Name


0, 1.0, 1.0, 255, 255, 255, 255, false, false, false, true, false, false, false)
        end
    end
end

RegisterNetEvent('mercy-phone/client/jobcenter/on-task-done', function(Job, FinishedTaskId, NextTaskId, Leader)
    if Job ~= 'houses' then return end
    if FinishedTaskId ~= 2 then return end
    if Leader ~= PlayerModule.GetPlayerData().CitizenId then return end

    local NearHouse = true
    Citizen.CreateThread(function()
        while NearHouse do
            if not HouseRobberies.Inside then
                local Distance = #(GetEntityCoords(PlayerPedId()) - vector3(Config.Houses.Houses[HouseRobberies.CurrentHouse].Coords.x, Config.Houses.Houses[HouseRobberies.CurrentHouse].Coords.y, Config.Houses.Houses[HouseRobberies.CurrentHouse].Coords.z))
                if Distance > 20.0 then
                    NearHouse = false
                end
            end
            Citizen.Wait(50)
        end
        TriggerEvent('mercy-phone/client/jobcenter/request-task-success', 3, true)
    end)
end)

RegisterNetEvent('mercy-phone/client/jobcenter/job-tasks-done', function(Job, Leader)
    if Job ~= 'houses' then return end
    if Leader ~= PlayerModule.GetPlayerData().CitizenId then return end
    EventsModule.TriggerServer('mercy-heists/server/housing/reset-house', HouseRobberies.CurrentHouse, false)
end)

RegisterNetEvent('mercy-phone/client/jobcenter/on-crash', function(Job, Leader)
    if Job ~= 'houses' then return end
    if HouseRobberies.Inside then TriggerEvent('mercy-heists/client/houses-leave', HouseRobberies.CurrentHouse, false, true) end
    EventsModule.TriggerServer('mercy-heists/server/housing/reset-house', HouseRobberies.CurrentHouse, true)
    if HouseRobberies.CurrentHouse ~= nil then HouseRobberies.CurrentHouse = nil end
    FunctionsModule.ClearCustomGpsRoute()
end)

RegisterNetEvent('mercy-items/client/used-lockpick', function(IsAdvanced)
    if not exports['mercy-phone']:IsJobCenterTaskActive('houses', 2) then return end
    if HouseRobberies.Inside or HouseRobberies.CurrentHouse == nil or IsPedInAnyVehicle(PlayerPedId()) then return end
    if Config.Houses.Houses[HouseRobberies.CurrentHouse] == nil and not Config.Houses.Houses[HouseRobberies.CurrentHouse].Locked then return end

    local HouseData = Config.Houses.Houses[HouseRobberies.CurrentHouse]

    if #(GetEntityCoords(PlayerPedId()) - vector3(HouseData.Coords.x, HouseData.Coords.y, HouseData.Coords.z)) > 1.5 then
        return
    end

    TriggerEvent('mercy-ui/client/play-sound', 'lockpick', 0.7)
    TriggerEvent('mercy-assets/client/lockpick-animation', true)
    local Outcome = exports['mercy-ui']:StartSkillTest(math.random(5, 8), IsAdvanced and { 1, 2 } or { 5, 10 }, IsAdvanced and { 6000, 12000 } or { 1500, 3000 }, true)
    TriggerEvent('mercy-assets/client/lockpick-animation', false)
    if Outcome then
        EventsModule.TriggerServer('mercy-heists/server/housing/sync-house', 'SetLocked', HouseRobberies.CurrentHouse, false)
        TriggerServerEvent('mercy-heists/client/housing/on-first-enter', HouseRobberies.CurrentHouse)
        TriggerEvent('mercy-phone/client/jobcenter/request-task-success', 2, true)


software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
package vjson.util

class TextBuilder(bufLen: Int) {
  private var buf = CharArray(bufLen) // use buf if not oob

  var bufLen = 0
    private set

  fun getBufCap(): Int {
    return buf.size
  }

  fun clear() {
    bufLen = 0
  }

  fun append(c: Char): TextBuilder {
    buf[bufLen++] = c
    if (bufLen == buf.size) {
      val newbuf = CharArray(bufLen * 4)
      buf.copyInto(newbuf, 0, 0, bufLen)
      buf = newbuf
    }
    return this
  }

  fun removeLast(): TextBuilder {
    if (bufLen != 0) {
      --bufLen
    }
    return this
  }

  override fun toString(): String {
    if (bufLen == 0) {
      return ""
    } else {
      return buf.concatToString(0, bufLen)
    }
  }
}
/*
 * The MIT License
 *
 * Copyright 2021 wkgcass (https://github.com/wkgcass)
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
package vjson.stringifier

import vjson.JSON
import vjson.Stringifier

@Suppress("MemberVisibilityCanBePrivate")
open class PrettyStringifier : Stringifier {
  /*#ifndef KOTLIN_NATIVE {{ */@JvmField/*}}*/
  protected var indent = 0

  protected fun indentIncr(): Int {
    return 4
  }

  protected fun increaseIndent() {
    indent += indentIncr()
  }

  protected fun decreaseIndent() {
    indent -= indentIncr()
  }

  protected fun endl(): String {
    return "\n"
  }

  protected fun ws(): String {
    return " "
  }

  protected fun writeNewline(sb: StringBuilder) {
    sb.append(endl())
  }

  protected fun writeIndent(sb: StringBuilder) {
    for (i in 0 until indent) {
      sb.append(ws())
    }
  }

  override fun beforeObjectBegin(sb: StringBuilder, obj: JSON.Object) {}

  override fun afterObjectBegin(sb: StringBuilder, obj: JSON.Object) {
    if (obj.size() > 1) {
      // {
      //     ...
      // }
      writeNewline(sb)
      increaseIndent()


from django.db import models
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from molly.utils.i18n import name_in_language

WEBCAM_WIDTHS = (100, 300, 200)

class Webcam(models.Model):

    slug = models.SlugField()

    url = models.URLField()
    """
    Represents the original URL of the image for this webcam, except in the case
    of the ``webcam`` view, where url is set to the resized version of the
    image.
    """

    fetch_period = models.PositiveIntegerField(help_text=_('in seconds'))

    @property
    def title(self):
        """
        The title for this webcam in the current language
        """
        return name_in_language(self, 'title')

    @property
    def description(self):
        """
        The description for this webcam in the current language
        """
        return name_in_language(self, 'description')

    @property
    def credit(self):
        """
        The credit for this webcam in the current language
        """
        return name_in_language(self, 'credit')

class WebcamName(models.Model):
    webcam = models.ForeignKey(Webcam, related_name='names')
    language_code = models.CharField(max_length=10, choices=settings.LANGUAGES)
    title = models.TextField()
    description = models.TextField()
    credit = models.TextField()


using UnityEngine;
/// <summary>
/// This class stores inormation about the current character being used
/// </summary>
///
public class CharacterData : MonoBehaviour
{
    [Tooltip("How tall the character is when standing")]
    public float characterHeight = 40;
    [Tooltip("How wide the character is when standing")]
    public float characterWidth = 20;
    [Tooltip("The pivot pixel point is used to declare the players position when standing")]
    public float playerPixelPivotPoint = 15;
    [Tooltip("How strong the character is when pushing")]
    public float characterStrength = 0;
    [Tooltip("How tall the character is when rolling")]
    public float rollingCharacterHeight = 30;
    [Tooltip("How wide the character is when rolling")]
    public float rollingCharacterWidth = 16;
    [Tooltip("Width radius value for sensor positioning when standing")]
    public float body


/*
 * Written by J.T. Conklin <jtc@acorntoolworks.com>
 * Public domain.
 */

#include <machine/asm.h>

#if defined(LIBC_SCCS)
	RCSID("$NetBSD: strcat.S,v 1.2 2014/03/22 19:16:34 jakllsch Exp $")
#endif

ENTRY(strcat)
	movq	%rdi,%rax
	movabsq	$0x0101010101010101,%r8
	movabsq	$0x8080808080808080,%r9

	/*
	 * Align destination to word boundary.
	 * Consider unrolling loop?
	 */
.Lscan:
.Lscan_align:
	testb	$7,%dil
	je	.Lscan_aligned
	cmpb	$0,(%rdi)
	je	.Lcopy
	incq	%rdi
	jmp	.Lscan_align

	_ALIGN_TEXT
.Lscan_aligned:
.Lscan_loop:
	movq	(%rdi),%rdx
	addq	$8,%rdi
	subq	%r8,%rdx
	testq	%r9,%rdx
	je	.Lscan_loop

	/*
	 * In rare cases, the above loop may exit prematurely. We must
	 * return to the loop if none of the bytes in the word equal 0.
	 */

	cmpb	$0,-8(%rdi)	/* 1st byte == 0? */
	jne	1f
	subq	$8,%rdi
	jmp	.Lcopy

1:	cmpb	$0,-7(%rdi)	/* 2nd byte == 0? */
	jne	1f
	subq	$7,%rdi
	jmp	.Lcopy

1:	cmpb	$0,-6(%rdi)	/* 3rd byte == 0? */
	jne	1f
	subq	$6,%rdi
	jmp	.Lcopy

1:	cmpb	$0,-5(%rdi)	/* 4th byte == 0? */
	jne	1f
	subq	$5,%rdi
	jmp	.Lcopy

1:	cmpb	$0,-4(%rdi)	/* 5th byte == 0? */
	jne	1f
	subq	$4,%rdi
	jmp	.Lcopy

1:	cmpb	$0,-3(%rdi)	/* 6th byte == 0? */
	jne	1f
	subq	$3,%rdi
	jmp	.Lcopy

1:	cmpb	$0,-2(%rdi)	/* 7th byte == 0? */
	jne	1f
	subq	$2,%rdi
	jmp	.Lcopy

1:	cmpb	$0,-1(%rdi)	/* 8th byte == 0


;
  }

  template<
    typename T0, typename T1, typename T2,
    typename T3, typename T4, typename T5,
    typename T6, typename T7, typename T8,
    typename T9
  >
  __host__ __device__
  typename detail::raw_reference<
    thrust::detail::tuple_of_iterator_references<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>
  >::type
  operator()(thrust::detail::tuple_of_iterator_references<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9> t,
             typename enable_if<
               is_unwrappable<thrust::detail::tuple_of_iterator_references<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9> >::value
             >::type * = 0)
  {
    return thrust::raw_reference_cast(t);
  }
}; // end raw_reference_caster

} // end detail

template<typename T>
__host__ __device__
typename detail::raw_reference<T>::type
  raw_reference_cast(T &ref)
{
  return *thrust::raw_pointer_cast(&ref);
} // end raw_reference_cast

template<typename T>
__host__ __device__
typename detail::raw_reference<const T>::type
  raw_reference_cast(const T &ref)
{
  return *thrust::raw_pointer_cast(&ref);
} // end raw_reference_cast

template<
  typename T0, typename T1, typename T2,
  typename T3, typename T4, typename T5,
  typename T6, typename T7, typename T8,
  typename T9
>
__host__ __device__
typename detail::enable_if_unwrappable<
  thrust::detail::tuple_of_iterator_references<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>,
  typename detail::raw_reference<
    thrust::detail::tuple_of_iterator_references<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>
  >::type
>::type
raw_reference_cast(thrust::detail::tuple_of_iterator_references<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9> t)
{
  thrust::detail::raw_reference_caster f;

  // note that we pass raw_reference_tuple_helper, not raw_reference as the unary metafunction
  // the different way that raw_reference_tuple_helper unwraps tuples is important
  return thrust::detail::tuple_host_device_transform<detail::raw_reference_detail::raw_reference_tuple_helper>(t, f);
} // end raw_reference_cast

} // end thrust


6
bfc528d4:	3c03dfdb 	lui	v1,0xdfdb
bfc528d8:	346314de 	ori	v1,v1,0x14de
bfc528dc:	01091025 	or	v0,t0,t1
bfc528e0:	144304eb 	bne	v0,v1,bfc53c90 <inst_error>
bfc528e4:	00000000 	nop
/home/ghj/Desktop/func/inst/n7_or.S:160
bfc528e8:	3c0849ea 	lui	t0,0x49ea
bfc528ec:	35085256 	ori	t0,t0,0x5256
bfc528f0:	3c097800 	lui	t1,0x7800
bfc528f4:	35294ec8 	ori	t1,t1,0x4ec8
bfc528f8:	3c0379ea 	lui	v1,0x79ea
bfc528fc:	34635ede 	ori	v1,v1,0x5ede
bfc52900:	01091025 	or	v0,t0,t1
bfc52904:	144304e2 	bne	v0,v1,bfc53c90 <inst_error>
bfc52908:	00000000 	nop
/home/ghj/Desktop/func/inst/n7_or.S:161
bfc5290c:	3c08a3db 	lui	t0,0xa3db
bfc52910:	35080a10 	ori	t0,t0,0xa10
bfc52914:	3c095650 	lui	t1,0x5650
bfc52918:	3529db82 	ori	t1,t1,0xdb82
bfc5291c:	3c03f7db 	lui	v1,0xf7db
bfc52920:	3463db92 	ori	v1,v1,0xdb92
bfc52924:	01091025 	or	v0,t0,t1
bfc52928:	144304d9 	bne	v0,v1,bfc53c90 <inst_error>
bfc5292c:	00000000 	nop
/home/ghj/Desktop/func/inst/n7_or.S:162
bfc52930:	3c080ca8 	lui	t0,0xca8
bfc52934:	35086144 	ori	t0,t0,0x6144
bfc52938:	3c093ffd 	lui	t1,0x3ffd
bfc5293c:	3529b54c 	ori	t1,t1,0xb54c
bfc52940:	3c033ffd 	lui	v1,0x3ffd
bfc52944:	3463f54c 	ori	v1,v1,0xf54c
bfc52948:	01091025 	or	v0,t0,t1
bfc5294c:	144304d0 	bne	v0,v1,bfc53c90 <inst_error>
bfc52950:	00000000 	nop
/home/ghj/Desktop/func/inst/n7_or.S:163
bfc52954:	3c08b1c7 	lui	t0,0xb1c7
bfc52958:	3508731a 	ori	t0,t0,0x731a
bfc5295c:	3c09fa49 	lui	t1,0xfa49
bfc52960:	3529621c 	ori	t1,t1,0x621c
bfc52964:	3c03fbcf 	lui	v1,0xfbcf
bfc52968:	3463731e


1H1V2H0V1Z"/><path fill="gray" d="M0,0H1V1H0V0ZM1,1H2V2H1V1Z"/></svg>');background-size:100%, 0.25em}

:root{--admonition-details-icon: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http: //www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M8.59 16.58L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z'/></svg>");--admonition-margin-top: 1.5rem;--admonition-margin-bottom: var(--admonition-margin-top);--admonition-margin-top-lp: 0px;--admonition-margin-bottom-lp: .75rem}.admonition{margin-top:var(--admonition-margin-top);margin-bottom:var(--admonition-margin-bottom);box-shadow:0 .2rem .5rem var(--background-modifier-box-shadow)}.admonition.no-title .admonition-content{margin-top:0;margin-bottom:0}.admonition li.task-list-item.is-checked p{text-decoration:line-through}.admonition.no-drop{box-shadow:none}.admonition.no-drop>.admonition-title.no-title+.admonition-content{margin-top:0;margin-bottom:0}.admonition.no-drop .admonition .admonition-content{border-right:.0625rem solid rgba(var(--admonition-color),.2);border-bottom:.0625rem solid rgba(var(--admonition-color),.2)}.admonition.no-drop .admonition .admonition-title.no-title+.admonition-content{border-top:.0625rem solid rgba(var(--admonition-color),.2);margin-top:0;margin-bottom:0}:is(.markdown-source-view.mod-cm6) .admonition .math-block>mjx-container{display:block;text-align:center;padding:1rem}:is(.markdown-reading-view) .admonition .math-block>mjx-container{display:block;text-align:center;padding:.0625rem}*:not(.is-live-preview) .admonition.no-content{display:none}.is-live-preview .admonition{margin-top:var(--admonition-margin-top-lp);margin-bottom:var(--admonition-margin-bottom-lp)}.is-live-preview .admonition.no-content{opacity:.1}.is-live-preview .admonition-content p{line-height:inherit;margin:revert}.is-live-preview .admonition-content p br{display:initial}.is-live-preview .admonition-content p ul>li>ul{border-left:var(--blockquote-border-thickness);border-left-color:var(--list-marker-color);border-left-style:solid}.is-live-preview .admonition-content:first-child{margin-top:.8rem}.is-live-preview .admonition-content:last-child{margin-bottom:.8rem}.admonition-title.no-title{display:none}.admonition-title:hover+.admonition-content .admonition-content-copy{opacity:.7}.admonition-content,.callout-content{position:relative}.admonition-content-copy{color:var(--text-faint);cursor:pointer;opacity:0;position:absolute;margin:.375rem;right:0;top:0;transition:.3s opacity ease-in}.admonition-content-copy:hover{color:var(--text-normal)}.admonition:hover .admonition-content-copy,.callout:hover .admonition-content-copy,.admonition-content-copy:hover{opacity:1}.admonition-settings .additional{margin:.375rem .75rem}.admonition-settings .additional>.setting-item{border-top:0;padding-top:.5625rem}.admonitio


/hit",
		miss_fx = "RedMiss",
		miss_sfx = "",
		alert_fx = "",
		hit_fx = "ShellMiss",
		range = 100,
		effect_type = 1,
		pierce_count = 0,
		ammo_type = 1,
		id = 20403208,
		random_damage_rate = 0,
		damage_type = {
			1,
			0.8,
			0.6
		},
		DMG_font = {
			{
				1,
				1
			},
			{
				1,
				1
			},
			{
				1,
				1
			}
		},
		acceleration = {},
		cld_box = {
			5,
			2,
			2
		},
		cld_offset = {
			0,
			0,
			0
		},
		hit_type = {},
		attach_buff = {},
		extra_param = {}
	},
	[20403209] = {
		range_offset = 0,
		modle_ID = "heiqiye02",
		type = 1,
		velocity = 2.32,
		antisub_enhancement = 0,
		out_bound = 1,
		hit_sfx = "battle/hit",
		miss_fx = "RedMiss",
		miss_sfx = "",
		alert_fx = "",
		hit_fx = "ShellMiss",
		range = 100,
		effect_type = 1,
		pierce_count = 0,
		ammo_type = 1,
		id = 20403209,
		random_damage_rate = 0,
		damage_type = {
			1,
			0.8,
			0.6
		},
		DMG_font = {
			{
				1,
				1
			},
			{
				1,
				1
			},
			{
				1,
				1
			}
		},
		acceleration = {},
		cld_box = {
			5,
			2,
			2
		},
		cld_offset = {
			0,
			0,
			0
		},
		hit_type = {},
		attach_buff = {},
		extra_param = {}
	},
	[20403210] = {
		range_offset = 0,
		modle_ID = "heiqiye02",
		type = 1,
		velocity = 2.47,
		antisub_enhancement = 0,
		out_bound = 1,
		hit_sfx = "battle/hit",
		miss_fx = "RedMiss",
		miss_sfx = "",
		alert_fx = "",
		hit_fx = "ShellMiss",
		range = 100,
		effect_type = 1,
		pierce_count = 0,
		ammo_type = 1,
		id = 20403210,
		random_damage_rate = 0,
		damage_type = {
			1,
			0.8,
			0.6
		},
		DMG_font = {
			{
				1,
				1
			},
			{
				1,
				1
			},
			{
				1,
				1
			}
		},
		acceleration = {},
		cld_box = {
			5,
			2,
			2
		},
		cld_offset = {
			0,
			0,
			0
		},
		hit_type = {},
		attach_buff = {},
		extra_param = {}
	},
	[20403211] = {
		range_offset = 0,
		modle_ID = "heiqiye02",
		type = 1,
		velocity = 2.7,
		antisub_enhancement = 0,
		out_bound = 1,
		hit_sfx = "battle/hit",
		miss_fx = "RedMiss",
		miss_sfx = "",
		alert_fx = "",
		hit_fx = "ShellMiss",
		range = 100,
		effect_type =


01233\u0001234","max-topic-unsubscribe-batch-size":"10","open-domain":"true","max-display-count":"99","message-update-batch-size":"200","reference_picker_url":"https://docs.google.com/picker?protocol\u003dgadgets\u0026hostId\u003dgeodiscussion\u0026relayUrl\u003dhttps://groups.google.com:443/forum/resources/835932635-rpc_relay.html\u0026hl\u003den\u0026ui\u003d2\u0026authuser\u003d0\u0026multiselectEnabled\u003dtrue\u0026nav\u003d((%22web%22,null,%7B%22safe%22:%22active%22%7D),(%22image-search%22,null,%7B%22safe%22:%22active%22%7D),(%22video-search%22,null,%7B%22safe%22:%22active%22%7D),(%22blog-search%22,null,%7B%22safe%22:%22active%22%7D),%7Broot:(%22all%22),items:((%22documents%22),(%22spreadsheets%22),(%22presentations%22),(%22recently-picked%22))%7D,(%22photos%22),(%22url%22))","domain":"","topics:nonmatching-refresh-limit":"100","user-adult":"true","date-table-num-years":"2","num-most-active":"4","alternateaccounts":"","authuser":"0","helpurl":"http://support.google.com/groups/bin/answer.py?hl\u003den\u0026answer\u003d46601","refresh-failure-limit-window":"10","logo":"https://groups.google.com/intl/en/images/logos/groups_logo_sm.gif","supported-locales":"en:English (United States),ar:Arabic - \u202bالعربية\u202c,bg:Bulgarian - \u202aбългарски\u202c,ca:Catalan - \u202acatalà\u202c,cs:Czech - \u202ačeština\u202c,da:Danish - \u202adansk\u202c,de:German - \u202aDeutsch\u202c,el:Greek - \u202aΕλληνικά\u202c,en-GB:English (United Kingdom) - \u202aEnglish (United Kingdom)\u202c,es:Spanish (Spain) - \u202aespañol (España)\u202c,es-419:Spanish (Latin America) - \u202aespañol (Latinoamérica)\u202c,et:Estonian - \u202aeesti\u202c,fa:Persian - \u202bفارسی\u202c,fi:Finnish - \u202asuomi\u202c,fil:Filipino - \u202aFilipino\u202c,fr:French - \u202afrançais\u202c,iw:Hebrew - \u202bעברית\u202c,hi:Hindi - \u202aहिन्दी\u202c,hr:Croatian - \u202ahrvatski\u202c,hu:Hungarian - \u202amagyar\u202c,hy:Armenian - \u202aՀայերէն\u202c,id:Indonesian - \u202aBahasa Indonesia\u202c,it:Italian - \u202aitaliano\u202c,ja:Japanese - \u202a日本語\u202c,ko:Korean - \u202a한국어\u202c,lt:Lithuanian - \u202alietuvių\u202c,lv:Latvian - \u202alatviešu\u202c,ms:Malay - \u202aBahasa Melayu\u202c,nl:Dutch - \u202aNederlands\u202c,no:Norwegian - \u202anorsk\u202c,pl:Polish - \u202apolski\u202c,


9-56.16-135.8-56.16c-87.66 0-159.1 70.66-159.1 159.8c0 34.81 27.19 158.8 159.1 158.8c79.45 0 144.6-55.1 158.1-126.7h-134.1c-17.67 0-32-14.33-32-32s14.33-31.1 32-31.1H416C433.7 224 448 238.3 448 256z"],gamepad:[640,512,[],"f11b","M448 64H192C85.96 64 0 149.1 0 256s85.96 192 192 192h256c106 0 192-85.96 192-192S554 64 448 64zM247.1 280h-32v32c0 13.2-10.78 24-23.98 24c-13.2 0-24.02-10.8-24.02-24v-32L136 279.1C122.8 279.1 111.1 269.2 111.1 256c0-13.2 10.85-24.01 24.05-24.01L167.1 232v-32c0-13.2 10.82-24 24.02-24c13.2 0 23.98 10.8 23.98 24v32h32c13.2 0 24.02 10.8 24.02 24C271.1 269.2 261.2 280 247.1 280zM431.1 344c-22.12 0-39.1-17.87-39.1-39.1s17.87-40 39.1-40s39.1 17.88 39.1 40S454.1 344 431.1 344zM495.1 248c-22.12 0-39.1-17.87-39.1-39.1s17.87-40 39.1-40c22.12 0 39.1 17.88 39.1 40S518.1 248 495.1 248z"],"gas-pump":[512,512,[9981],"f52f","M336 448h-320c-8.75 0-16 7.25-16 16l0 32c0 8.75 7.25 16 16 16h320c8.75 0 16-7.25 16-16l0-32C352 455.2 344.8 448 336 448zM493.2 107.2l-80.97-80.97c-6.25-6.125-16.5-6.125-22.62 0l-11.38 11.38c-6.125 6.125-6.125 16.38 0 22.62l37.75 37.63V160c0 28.12 20.88 51.25 48 55.25V376c0 13.25-10.75 24-24 24c-13.25 0-24-10.75-24-24v-32c0-48.63-39.38-88-88-88h-7.1l0-192c0-35.25-28.75-64-64-64H96C60.75 0 32 28.75 32 64L32 416h288l.0001-112h8c22.12 0 40 17.88 40 40v27.75c0 37.75 27 72 64.5 76c43 4.25 79.5-29.5 79.5-71.75V152.6C512 135.6 505.2 119.2 493.2 107.2zM256 192H96V64h159.1V192z"],"gauge-simple":[576,512,[61668,"gauge-simple-high","tachometer"],"f62a","M288 32c-159 0-288 129-288 288c0 52.75 14.25 102.3 39 144.8c5.625 9.625 16.38 15.25 27.5 15.25h443c11.12 0 21.88-5.625 27.5-15.25C561.8 422.3 576 372.8 576 320C576 161 447 32 288 32zM451.2 206.4l-108.6 144.8C348.5 360.8 352 371.9 352 384c0 11.75-3.375 22.5-8.875 32H232.9C227.4 406.5 224 395.


�|✔|
|TILE_F_Nokia_2|✔|✔|✔|
|TILE_G_Nokia_2|✔|✔|✔|
|TMVP_A_Chipsnmedia_3|✔|✔|✔|
|TMVP_B_Chipsnmedia_3|✔|✔|✔|
|TMVP_C_Chipsnmedia_3|✔|✔|✔|
|TMVP_D_Chipsnmedia_3|✔|✔|✔|
|TRANS_A_Chipsnmedia_2|✔|⌛|✔|
|TRANS_B_Chipsnmedia_2|✔|✔|✔|
|TRANS_C_Chipsnmedia_4|✔|✔|✔|
|TRANS_D_Chipsnmedia_4|✔|✔|✔|
|TREE_A_HHI_3|⌛|⌛|✔|
|TREE_B_HHI_3|⌛|⌛|✔|
|TREE_C_HHI_3|⌛|⌛|⌛|
|VIRTUAL_A_MediaTek_3|✔|✔|✔|
|VIRTUAL_B_MediaTek_3|✔|✔|✔|
|VPS_A_INTEL_3|❌|☠|☠|
|VPS_B_ERICSSON_1|❌|☠|☠|
|VPS_C_ERICSSON_1|☠|☠|☠|
|WP_A_InterDigital_3|✔|✔|✔|
|WP_B_InterDigital_3|✔|✔|✔|
|WPP_A_Sharp_3|✔|✔|✔|
|WPP_B_Sharp_2|✔|✔|✔|
|WRAP_A_InterDigital_4|✔|✔|✔|
|WRAP_B_InterDigital_4|✔|✔|✔|
|WRAP_C_InterDigital_4|✔|✔|✔|
|WRAP_D_InterDigital_4|✔|✔|✔|
|-|-|-|-|
|TOTAL|213/282|234/282|233/282|

### H.265/HEVC Intel
#### Test suite: JCT-VC-HEVC_V1

`./fluster.py run -d FFmpeg-H.265 FFmpeg-H.265-VAAPI GS


nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
#endif
#ifdef BB_BOOT
    lui   $t1, %hi(PHYS_TO_K1(SP_PC_REG))
    lw    $t1, %lo(PHYS_TO_K1(SP_PC_REG))($t1)
    beqz  $t1, .LA4000698
     nop
    addiu $t2, $zero, 0x41
    lui   $at, %hi(PHYS_TO_K1(SP_STATUS_REG))
    sw    $t2, %lo(PHYS_TO_K1(SP_STATUS_REG))($at)
    lui   $at, %hi(PHYS_TO_K1(SP_PC_REG))
    sw    $zero, %lo(PHYS_TO_K1(SP_PC_REG))($at)
.LA4000698:
    li    $t3, 0x00AAAAAE
    lui   $at, %hi(PHYS_TO_K1(SP_STATUS_REG))
    sw    $t3, %lo(PHYS_TO_K1(SP_STATUS_REG))($at)
    li    $t0, 1365
    lui   $at, %hi(PHYS_TO_K1(MI_INTR_MASK_REG))
    sw    $t0, %lo(PHYS_TO_K1(MI_INTR_MASK_REG))($at)
    lui   $at, %hi(PHYS_TO_K1(SI_STATUS_REG))
    sw    $zero, %lo(PHYS_TO_K1(SI_STATUS_REG))($at)
    lui   $at, %hi(PHYS_TO_K1(AI_STATUS_REG))
    sw    $zero, %lo(PHYS_TO_K1(AI_STATUS_REG))($at)
    li    $t1, 2048
    lui   $at, %hi(PHYS_TO_K1(MI_MODE_REG))
    sw    $t1, %lo(PHYS_TO_K1(MI_MODE_REG))($at)
    li    $t1, 2
    lui   $at, %hi(PHYS_TO_K1(PI_STATUS_REG))
    sw    $t1, %lo(PHYS_TO_K1(PI_STATUS_REG))($at)
    lui   $t0, (0xA0000300 >> 16)
    ori   $t0, (0xA0000300 & 0xFFFF)
    sw    $s4, ($t0)
    sw    $s3, 4($t0)
#else
    lui   $t3, %hi(PHYS_TO_CART(CART_ENTRYPOINT))
    lw    $a0, %lo(PHYS_TO_CART(CART_ENTRYPOINT))($t3)
    move  $a1, $s6
    lui   $at, (0x5D588B65 >> 16)
    ori   $at, (0x5D588B65 & 0xFFFF)
    multu $a1, $at
    addiu $sp, $sp, -0x20
    sw    $ra, 0x1c($sp)
    sw    $s


                                                                                pady=7)

    link = "https://www.linkedin.com/in/prabaljainn"
    text = Text(root, height=1, padx=10, borderwidth=1, bg="cyan")
    text.insert(1.0, link)
    text.configure(state="normal")
    text.grid(row=30, column=0)
    text.configure(inactiveselectbackground=text.cget("selectbackground"))

    link = "https://github.com/prabaljainn"
    text = Text(root, height=1, padx=10, borderwidth=1, bg="cyan")
    text.insert(1.0, link)
    text.configure(state="normal")
    text.grid(row=32, column=0)
    text.configure(inactiveselectbackground=text.cget("selectbackground"))
    Button(root, text="Quit", command=root.destroy).grid(row=34)

    root.mainloop()


iveEncoding<WordCloudEncodingConfig>;
import { NextApiRequest, NextApiResponse } from "next";

export default async (req: NextApiRequest, res: NextApiResponse) => {
  switch (req.method) {
    case "GET":
      try {
        let payload;
        if (
          req.cookies.access_token &&
          req.cookies.access_token.split(".").length === 3
        ) {
          payload = req.cookies.access_token.split(".")[1];
        } else {
          return res
            .status(404)
            .json({ message: "not a user, valid access_token does not exist" });
        }

        const data = JSON.parse(Buffer.from(payload, "base64").toString());

        return res.status(200).json(data);
      } catch (e) {
        console.log("error: ", e);
        return res.status(404).json({ message: "not a user" });
      }
    default:
      return res.status(404).json({});
  }
};
import { FieldNode, IntValueNode, SelectionNode, ValueNode } from 'graphql';
import { assertSome, parseSelectionSet } from '@graphql-tools/utils';
import { forwardArgsToSelectionSet } from '../src/index.js';

function assertIntValueNode(input: ValueNode): asserts input is IntValueNode {
  if (input.kind !== 'IntValue') {
    throw new Error(`Expected "StringValue", got "${input.kind}".`);
  }
}

function assertFieldNode(input: SelectionNode): asserts input is FieldNode {
  if (input.kind !== 'Field') {
    throw new Error(`Expected "SelectionNode", got "${input.kind}".`);
  }
}

describe('forwardArgsToSelectionSet', () => {
  // TODO: assert this
  const GATEWAY_FIELD = parseSelectionSet('{ posts(pageNumber: 1, perPage: 7) }').selections[0];
  assertFieldNode(GATEWAY_FIELD);

  test('passes all arguments to a hint selection set', () => {
    const buildSelectionSet = forwardArgsToSelectionSet('{ postIds }');
    const result = buildSelectionSet(GATEWAY_FIELD).selections[0];
    assertFieldNode(result);
    expect(result.name.value).toEqual('postIds');
    assertSome(result.arguments);
    expect(result.arguments.length).toEqual(2);
    expect(result.arguments[0].name.value).toEqual('pageNumber');
    assertIntValueNode(result.arguments[0].value);
    expect(result.arguments[0].value.value).toEqual('1');
    expect(result.arguments[1].name.value).toEqual('perPage');
    assertIntValueNode(result.arguments[1].value);
    expect(result.arguments[1].value.value).toEqual('7');
  });

  test('passes mapped arguments to a hint selection set', () => {
    const buildSelectionSet = forwardArgsToSelectionSet('{ id postIds }', {
      postIds: ['pageNumber'],
    });
    const result = buildSelectionSet(GATEWAY_FIELD);

    expect(result.selections.length).toEqual(2);
    assertFieldNode(result.selections[0]);
    expect(result.selections[0].name.value).toEqual('id');
    assertSome(result.selections[0].arguments);
    expect(result.selections[0].arguments.length).toEqual(0);
    assertFieldNode(result.selections[1]);
    expect(result.selections[1].name.value).toEqual('postIds');
    assertSome(result.selections[1].arguments);
    expect(result.selections[1].arguments.length).toEqual(1);
    expect(result.selections[1].arguments[0].name.value).toEqual('pageNumber');
    assertIntValueNode(result.selections[1].arguments[0].value);
    expect(result.selections[1].arguments[0].value.value).toEqual('1');
  });
});
import "./StyleClass";
import "./StyleComponents/StyleComponent";
import "./StyleComponents/CircleGraphic";
import "./StyleComponents/ImageGraphic";
import "./StyleComponents/LineGraphic";
import "./StyleComponents/RectangleGraphic";
import "./StyleComponents/RoundedRectangleGraphic";
import "./StyleComponents/TextGraphic";

import { Style


export const closeAnswerAC: ActionCreator<CloseAnswerAction> = () => ({
  type: CLOSE_ANSWER,
});

export const submitAnswerThunk = (commentId:string, text:string):ThunkAction<void, IInitialState, unknown, Action>=>(dispatch, getState)=> {//типизация из документации
  dispatch(closeAnswerAC());//пока что тупо переключает на false
  alert(`axios, submitting "${text}" id: "${commentId}"`)
}/**
 * Sets multiple attributes to an Element.
 * @param el The Element to set.
 * @param attributeTuples An array of string tuples representing the attribute name and intended value.
 */
let setAttributeTuples = <T = Element>(el: Element, attributeTuples: [string, string][] ) => {
    attributeTuples.forEach( (tuple) => {
        el.setAttribute(tuple[0], tuple[1]);
    });
    return el as any as T;
};
export default setAttributeTuples;import { resolveNullable } from './resolveNullable'

it('resolves with a value', () => {
  const result = resolveNullable('yup')
  return expect(result).resolves.toEqual('yup')
})

it('rejects with an error when undefined value is given', () => {
  const result = resolveNullable(undefined, new Error('nope'))
  return expect(result).rejects.toThrow('nope')
})

it('rejects with an error when null value is given', () => {
  const result = resolveNullable(null, new Error('nope'))
  return expect(result).rejects.toThrow('nope')
})

it('rejects with a default error when null value is given', () => {
  const result = resolveNullable(null)
  return expect(result).rejects.toThrow('value was null')
})
import { action, computed, observable } from 'mobx'

import { LINK_REGEXP } from '../utils/regexp'

export class InputAreaStore {
  @observable public text = `
https://www.youtube.com/watch?v=uF2TxT6u6cY
https://4everfreebrony.bandcamp.com/track/who-knows-feat-milkmomo-eilemonty-memj0123
https://www.youtube.com/playlist?list=PLHU8QTqz8ElOmVrfpdKXf0nJ7z89boahd
  `

  @action
  public setText(val: string) {
    this.text = val
  }

  @computed
  public get links(): string[] {
    const links = this.text.match(LINK_REGEXP) || []
    return links.filter((el, i) => links.indexOf(el) === i)
  }

  @computed
  public get count(): number {
    return this.links.length
  }
}

export default new InputAreaStore()
import { Injectable } from "@nestjs/common";
import { InjectModel } from "@nestjs/mongoose";
import { Model } from "mongoose";
import { CreateIdeaDto } from "./dto/create-idea.dto";
import { Ideas } from "./ideas.interface";

@Injectable()
export class IdeasService {
  constructor(@InjectModel("Ideas") private ideasModel: Model<Ideas>) {}

  async create(createIdeaDto: CreateIdeaDto): Promise<Ideas> {
    const createdIdea = new this.ideasModel(createIdeaDto);
    createdIdea.status = 0;
    return createdIdea.save();
  }

  async findAll(): Promise<Ideas[]> {
    return this.ideasModel.find().exec();
  }

  async toggleStatus(id: string): Promise<Ideas> {
    const idea = await this.ideasModel.findOne({ _id: id });

    switch (idea.status) {
      case 0:
        idea.status = 1;
        break;
      case 1:
        idea.status = 2;
        break;
      case 2:
        idea.status = 0;
        break;
      default:
        idea.status = 1;
    }

    return idea.save();
  }

  async remove(id: st


, 0x01006a0f, StringDataType.class, 1, 0);

		doAction(CYCLE_CHAR_STRING_UNICODE, true);
		checkDataType(0x01006a00, 0x01006a0f, UnicodeDataType.class, 1, 0);

		doAction(CYCLE_CHAR_STRING_UNICODE, true);
		checkDataType(0x01006a00, 0x01006a0f, CharDataType.class, 0x10, 0);

		clearSelection();
	}

	@Test
	public void testByteCycle() {

		// Byte cycle action on Undefined data

		gotoLocation(0x010069f2);
		assertTrue("Undefined data expected", !getContextData().isDefined());

		doAction(CYCLE_BYTE_WORD_DWORD_QWORD, true);

		Set<DockingActionIf> actions = getDataPluginActions();
		assertEquals(ACTION_COUNT, actions.size());
		checkOnDefined(actions, ByteDataType.class);

		gotoLocation(0x010069f0);
		checkOnUndefined(actions);

		gotoLocation(0x010069f2);
		checkOnDefined(actions, ByteDataType.class);

		gotoLocation(0x01006a00);
		checkOnUndefined(actions);

		// Repeat as recently used and run full cycle

		doAction(RECENTLY_USED, true);
		checkOnDefined(actions, ByteDataType.class);

		doAction(CYCLE_BYTE_WORD_DWORD_QWORD, true);
		actions = getDataPluginActions();
		checkOnDefined(actions, WordDataType.class);

		doAction(CYCLE_BYTE_WORD_DWORD_QWORD, true);
		actions = getDataPluginActions();
		checkOnDefined(actions, DWordDataType.class);

		doAction(CYCLE_BYTE_WORD_DWORD_QWORD, true);
		actions = getDataPluginActions();
		checkOnDefined(actions, QWordDataType.class);

		doAction(CYCLE_BYTE_WORD_DWORD_QWORD, true);
		actions = getDataPluginActions();
		checkOnDefined(actions, ByteDataType.class);

		clearLocation(0x01006a00);
		checkOnUndefined(actions);

		// Byte cycle on selection

		makeSelection(0x01006a00, 0x01006a12);

		doAction(CYCLE_BYTE_WORD_DWORD_QWORD, true);
		checkDataType(0x01006a00, 0x01006a12, ByteDataType.class, 19, 0);

		doAction(CYCLE_BYTE_WORD_DWORD_QWORD, true);
		checkDataType(0x01006a00, 0x01006a12, WordDataType.class, 10, 0);

		doAction(CYCLE_BYTE_WORD_DWORD_QWORD, true);
		checkDataType(0x01006a00, 0x01006a12, DWordDataType.class, 5, 0);

		doAction(CYCLE_BYTE_WORD_DWORD_QWORD, true);
		checkDataType(0x01006a00, 0x01006a12, QWordDataType.class, 3, 0);

		doAction(CYCLE_BYTE_WORD_DWORD_QWORD, true);
		checkDataType(0x01006a00, 0x01006a12, ByteDataType.class, 19, 0);

		clearSelection();

		// Test cycle when it does not fit

		gotoLocation(0x010069f0);
		actions = getDataPluginActions();
		checkOnUndefined(actions);

		doAction(CYCLE_BYTE_WORD_DWORD_QWORD, true);
		actions = getDataPluginActions();
		checkOnDefined(actions, ByteDataType.class);

		doAction(CYCLE_BYTE_WORD_DWORD_QWORD, true);
		actions = getDataPluginActions();
		checkOnDefined(actions, WordDataType.class);

		doAction(CYCLE_BYTE_WORD_DWORD_QWORD, true);
		actions = getDataPluginActions();
		checkOnUndefined(actions);

	}

	@Test
	public void testFloatCycle() {

		// Float cycle action


员的访问属性在派生类中分别变成：protected, protected, private
  + private继承：
    > 基类public成员，protected成员，private成员的访问属性在派生类中分别变成：private, private, private
### 库Library
  > 库是将代码集合成的一个产品，供程序员调用

    在函数库中的可直接使用的函数叫库函数

    开发者在使用库的时候，只需要使用库的一部分类或函数，然后继续实现自己的功能
  + 面向对象的代码组织形式而成的库也叫类库。
  + 面向过程的代码组织形式而成的库也叫函数库。

### 框架Framework
  > 框架则是为解决一个(一类)问题而开发的产品

    框架用户一般只需要使用框架提供的类或函数，即可实现全部功能

    框架是库的升级版

    开发者在使用框架的时候，必须使用这个框架的全部代码

### 框架和库的比较:
  > 假如我们要买一台电脑。框架为我们提供了已经装好的电脑，我们只要买回来就能用，但你必须把整个电脑买回来。这样用户自然轻松许多，但会导致
  很多人用一样的电脑，或你想自定义某个部件将需要修改这个框架。而库就如自己组装的电脑。库为我们提供了很多部件，我们需要自己组装，如果某个部件
  库未提供，我们也可以自己做。库的使用非常灵活，但没有框架方便。
---
  常说的 C函数库、 .net框架 就体现了框架和库的区别:
  C中库函数需要自己 #include
  .net 中，所有程序都引用了 mscore.dll (System 名字空间)
### 内部排序
  > **稳定性**:当Ki=Kj，经过排序后保持Ki，Kj的相对前后位置不变(元素之间的距离可以变)，称为**稳定的**,否则称为**不稳定的**
  >> 例如:序列5 8 5 2 9，在选择排序中我们知道第一遍选择第1个元素5会和2交换，那么原序列中2个5的相对前后顺序就被破坏了，所以**选择排序**不稳定

      在冒泡排序中，两个5最后结果前后顺序并未发生改变，所以**冒泡排序**是稳定的
  + 性能比较

  |类别|排序方法|平均O|最优O|最差O|辅助空间|稳定性|
  |:-----|:-----:|:-----:|:-----:|:-----:|:-----:|-----:|
  |插入排序|直接插入|O(n2)|O(n)|O(n2)|O(1)|稳定|
  ||希尔排序|O(n1.3)|O(n)|O(n2)|O(1)|不稳定|
  |选择排序|简单选择|O(n2)|O(n2)|O(n2)|O(1)|不稳定|
  ||堆排序|O(nlog2n)|O(nlog2n)|O(nlog2n)|O(1


d='m12 2 2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304'/%3E%3C/svg%3E")}a.comment-liked:hover:before,div.comment-liked a.comment-like-link:hover:before{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' d='M0 0h24v24H0z'/%3E%3Cpath fill='%23ff9a00' d='m12 2 2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304'/%3E%3C/svg%3E")}a.comment-like-link{color:#222;font-size:12px;opacity:.8;text-decoration:none}a.comment-like-link.loading:before{opacity:0;transition:opacity 2s}.wpl-likebox.wpl-new-layout{align-items:center;display:flex}.wpl-likebox.wpl-new-layout .wpl-avatars{align-items:center;display:inline-flex;flex-direction:row-reverse;flex-wrap:wrap;justify-content:center;margin-bottom:4px}.rtl .wpl-likebox.wpl-new-layout .wpl-avatars{flex-wrap:wrap;justify-content:flex-end;margin-left:8px;overflow:initial}.rtl .wpl-likebox.wpl-new-layout .wpl-avatars li,.wpl-likebox.wpl-new-layout .wpl-avatars li{margin-bottom:10px;margin-top:1px}.wpl-likebox.wpl-new-layout .wpl-avatars li a{margin:0;position:relative}.wpl-likebox.wpl-new-layout .wpl-avatars li:not(:first-child) a{margin-left:-4px}.rtl .wpl-likebox.wpl-new-layout .wpl-avatars li:not(:first-child) a{margin-right:-4px}.wpl-likebox.wpl-new-layout .wpl-avatars li a img{border:1.5px solid hsla(0,0%,100%,.5);border-radius:50%;height:26px;width:26px}.wpl-likebox.wpl-new-layout .wpl-count{clear:none;margin-bottom:4px;margin-right:8px;white-space:nowrap}.rtl .wpl-likebox.wpl-new-layout .wpl-count{margin-left:12px;margin-right:0;white-space:nowrap}.wpl-likebox a{color:#2c3338!important}.wpl-likebox a,.wpl-likebox a:focus{text-decoration:none!important}.components-likes-placeholder__learn-more{margin:1em 0 2em}._fUXxnSp5pagKBp9gSN7 *{box-sizing:border-box}.wp-block-jetpack-mailchimp.is-processing form{display:none}.wp-block-jetpack-mailchimp .wp-block-jetpack-button,.wp-block-jetpack-mailchimp p{margin-bottom:1em}.wp-block-jetpack-mailchimp input{box-sizing:border-box;width:100%}.wp-block-jetpack-mailchimp .error,.wp-block-jetpack-mailchimp .error:focus{outline:1px;outline-color:#d63638;outline-offset:-2px;outline-style:auto}.wp-block-jetpack-mailchimp .wp-block-jetpack-mailchimp_notification{display:none;margin-bottom:1.5em;padding:.75em}.wp-block-jetpack-mailchimp .wp-block-jetpack-mailchimp_notification.is-visible{display:block}.wp-block-jetpack-mailchimp .wp-block-jetpack-mailchimp_notification.wp-block-jetpack-mailchimp_error{background-color:#d63638;color:#fff}.wp-block-jetpack-mailchimp .wp-block-jetpack-mailchimp_noti


   btn:SetOnClick(onclick)

        return btn
    end,

    -----------------
    -----------------
    -- BACK BUTTON --
    -----------------
    -----------------
    -- To be added as a child of the root. onclick should be whatever cancel/back fn is appropriate for your screen.
    BackButton = function(onclick, txt, txt_offset, shadow_offset, scale)
        local btn = ImageButton("images/frontend.xml", "turnarrow_icon.tex", "turnarrow_icon_over.tex", nil, nil, nil, {1,1}, {0,0})
        btn:SetPosition(-RESOLUTION_X*.4 - 10, -RESOLUTION_Y*.5 + BACK_BUTTON_Y)

        btn.scale = scale or 1

        btn.image:SetPosition(-63, 0)
        btn.image:SetScale(.7)

        btn:SetText(txt or STRINGS.UI.SERVERLISTINGSCREEN.BACK, true, { shadow_offset and shadow_offset.x or 2, shadow_offset and shadow_offset.y or -1})
        if txt_offset then
            local textPos = btn.text:GetPosition()
        	btn.text:SetPosition(textPos.x + txt_offset.x, textPos.y + txt_offset.y)
            local textShadowPos = btn.text_shadow:GetPosition()
        	btn.text_shadow:SetPosition(textShadowPos.x + txt_offset.x, textShadowPos.y + txt_offset.y)
        end
        btn:SetTextColour(unpack(GOLD))
        btn:SetTextFocusColour(unpack(PORTAL_TEXT_COLOUR))
        btn:SetFont(NEWFONT_OUTLINE)
        btn:SetDisabledFont(NEWFONT_OUTLINE)
        btn:SetTextDisabledColour(unpack(GOLD))

        btn.bg = btn:AddChild(Image("images/ui.xml", "blank.tex"))
        local w,h = btn.text:GetRegionSize()
        btn.bg:ScaleToSize(w+50, h+15)
        if txt_offset then
            btn.bg:SetPosition(txt_offset.x, txt_offset.y)
        end

        btn:SetOnGainFocus(function()
            btn:SetScale(btn.scale + .05)
        end)
        btn:SetOnLoseFocus(function()
            btn:SetScale(btn.scale)
        end)

        btn:SetOnClick(onclick)

        btn:SetScale(btn.scale)

        return btn
    end,

    -------------------------
    -------------------------
    -- SERVER DETAIL IMAGE --
    -------------------------
    -------------------------
    ServerDetailIcon = function(iconAtlas, iconTexture, bgColor, hoverText, textinfo, imgOffset, scaleX, scaleY)
        local icon = Widget("detail_icon")
        icon.bg = icon:AddChild(Image("images/servericons.xml", bgColor and "bg_"..bgColor..".tex" or "bg_burnt.tex"))
        icon.bg:SetScale(.09)
        icon.img = icon:AddChild(Image(iconAtlas, iconTexture))
        icon.img:SetScale(scaleX or .075, scaleY or .075)
        icon.img:SetPosition(imgOffset and imgOffset[1] or -1, imgOffset and imgOffset[2] or 0)

        if hoverText and hoverText ~= "" then
            if not textinfo then textinfo = {} end
            icon:SetHoverText(hoverText, { font = textinfo.font or NEWFONT_OUTLINE, offset_x = 1, offset_y = 28, colour = textinfo.colour or {1,1,1,1}, bg = textinfo.bg })
        end

        return icon
    end,

    -----------------
    -----------------
    -- INVISIBLE BUTTON --
    -----------------
    -----------------

    InvisibleButton = function(width, height, onclick, onfocus)
    	local btn = ImageButton("images/ui.xml", "blank.tex", "blank.tex", "blank.tex", "blank.tex",


8198"/><path fill="#92D3F5" stroke="#92D3F5" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="m32.103 44.066c-0.75813 3.7545-1.516 7.5079-3.6638 9.4562-2.1478 1.9483-5.6846 2.0927-7.9036-0.93857-2.219-3.0312-3.1212-9.2385-2.4695-12.725 0.65167-3.4868 2.8607-4.2531 5.602-5.4795 2.7413-1.2264 6.0204-2.9151 9.3011-4.6046z"/><path fill="#92D3F5" stroke="none" d="m36.108 22.845c1.1677-0.75117 2.3515-1.5127 4.2562-2.536 1.9047-1.0233 4.5628-2.3295 7.3719-3.0366 2.8091-0.70712 5.7684-0.81539 8.9995-0.92767 3.2311-0.11228 6.7338-0.22857 8.7992 0.71041 2.0654 0.93898 2.6939 2.9319 0.63551 6.76-2.0584 3.8281-6.8031 9.492-11.126 11.068-4.3233 1.576-8.226-0.93668-11.041-2.5058-2.815-1.5691-4.5423-2.1941-6.2708-2.8196"/><path fill="#92D3F5" stroke="#92D3F5" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="m39.897 44.066c0.75813 3.7545 1.516 7.5079 3.6638 9.4562 2.1478 1.9483 5.6846 2.0927 7.9036-0.93857 2.219-3.0312 3.1212-9.2385 2.4697-12.725-0.65148-3.4867-2.8579-4.2521-5.6008-5.4791-2.7429-1.227-6.022-2.9157-9.3024-4.605 z"/><ellipse cx="35.807" cy="17.922" rx="3.5601" ry="2.6701" fill="#9B9B9A" stroke="none"/><ellipse cx="35.819" cy="23.563" rx="3.353" ry="2.7346" fill="#3F3F3F" stroke="none"/><path fill="#9B9B9A" stroke="none" d="m35.394 26.812c-6.3212 0.67634 0.6061 20.481 0.6061 20.481s7.8636-21.387-0.6061-20.481z"/></g><g id="hair"/><g id="skin"/><g id="skin-shadow"/><g id="line"><path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="m32.103 44.066c-0.75813 3.7545-1.516 7.5079-3.6638 9.4562-2.1478 1.9483-5.6846 2.0927-7.9036-0.93857-2.219-3.0312-3.1212-9.2385-2.4695-12.725 0.65167-3.4868 2.8581-4.2522 5.0655-5.0179"/><path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="m32.39 20.592c-2.6586-1.3063-5.3167-2.6125-8.1258-3.3196-2.8091-0.70712-5.7684-0.81539-8.9995-0.92767-3.2311


ldr             d28, [x9]
        dup             v0.16b, v28.b[0]
        dup             v1.16b, v28.b[1]
        dup             v2.16b, v28.b[2]
        dup             v3.16b, v28.b[3]
        dup             v4.16b, v28.b[4]
        dup             v5.16b, v28.b[5]
        dup             v6.16b, v28.b[6]
        dup             v7.16b, v28.b[7]

        mov             w10, #-6
        sub             w10, w10, w5
        dup             v30.8h, w6              // wx
        dup             v31.4s, w10             // shift
        dup             v29.4s, w7              // ox
.endm

.macro QPEL_FILTER_B dst, src0, src1, src2, src3, src4, src5, src6, src7
        umull           \dst\().8h, \src1\().8b, v1.8b
        umlsl           \dst\().8h, \src0\().8b, v0.8b
        umlsl           \dst\().8h, \src2\().8b, v2.8b
        umlal           \dst\().8h, \src3\().8b, v3.8b
        umlal           \dst\().8h, \src4\().8b, v4.8b
        umlsl           \dst\().8h, \src5\().8b, v5.8b
        umlal           \dst\().8h, \src6\().8b, v6.8b
        umlsl           \dst\().8h, \src7\().8b, v7.8b
.endm

.macro QPEL_FILTER_B2 dst, src0, src1, src2, src3, src4, src5, src6, src7
        umull2          \dst\().8h, \src1\().16b, v1.16b
        umlsl2          \dst\().8h, \src0\().16b, v0.16b
        umlsl2          \dst\().8h, \src2\().16b, v2.16b
        umlal2          \dst\().8h, \src3\().16b, v3.16b
        umlal2          \dst\().8h, \src4\().16b, v4.16b
        umlsl2          \dst\().8h, \src5\().16b, v5.16b
        umlal2          \dst\().8h, \src6\().16b, v6.16b
        umlsl2          \dst\().8h, \src7\().16b, v7.16b
.endm

.macro  QPEL_UNI_W_V_4
        smull           v24.4s, v24.4h, v30.4h
        sqrshl          v24.4s, v24.4s, v31.4s
        sqadd           v24.4s, v24.4s, v29.4s
        sqxtn           v24.4h, v24.4s
        sqxtun          v24.8b, v24.8h
        st1             {v24.s}[0], [x0], x1
.endm

function ff_hevc_put_hevc_qpel_uni_w_v4_8_neon, export=1
        QPEL_UNI_W_V_HEADER
        ldr             s16, [x2]
        ldr             s17, [x2, x3]
        add             x2, x2, x3, lsl #1
        ldr             s18, [x2]
        ldr             s19, [x2, x3]
        add             x2, x2, x3, lsl #


中台”的文章，大家的观点各不相同：

- 有的观点说，数据中台是一种数据建设的方法论，按照数据中台设计方法和规范实施就可以建成数据中台了；
- 也有观点认为，数据中台的背后是数据部门组织架构的变更，把原先分散的组织架构形成一个统一的中台部门，就建成了数据中台；
- 除此之外，你可能还听到过一些大数据公司说，他们可以卖支撑数据中台建设的产品技术。

那数据中台到底如何建设呢？咱们先不着急回答这个问题，而是看一个例子。

你肯定见过盖房子，盖房子之前，是不是先得有设计图纸，知道如何去盖这个房子？然后还必须要有一个好用的工具（比如水泥搅拌机、钢筋切割机）帮你盖好这个房子。当然了，盖房子离不开一个靠谱的施工队伍，这里面涉及很多角色（泥瓦工、木工、水电工等等），这些人必须高效协作，最终才能盖出一个好的房子。

如果我们把建数据中台比作是盖房子，那么设计图纸就是数据中台建设的方法论；工具是数据中台的支撑技术；施工队伍就是数据中台的组织架构。这三者缺一不可。

这一讲我就以全局的视角，让你从宏观上了解如何建设一个企业级的数据中台。

## 数据中台建设方法论

早在2016年，阿里巴巴就提出了数据中台建设的核心方法论：OneData和OneService。经过这么多年，很多公司都进行了实践，但你很难找出一个准确的定义去描述这些方法论，而我结合自己在网易数据中台建设的经验，对方法论进行了系统化的定义，你可以借鉴参考一下。

### OneData

用一句话定义OneData的话，就是所有数据只加工一次。 这个概念具体是啥意思呢？我们来看一个例子。

<img src="https://static001.geekbang.org/resource/image/11/0d/111bdb91bcc9f36ea3da013a3bca610d.jpg" alt="">

电商业务建设数据中台之前，每个部门内部都会有一些小的数仓去完成本部门的数据分析需求。

有一天，供应链团队接到一个数据需求，那就是计算“商品库存”指标，供应链的运营需要根据每个商品的库存制订商品采购计划，部门的数据开发从业务系统同步数据，进行数据清洗、聚合、深度加工，最终，产出这个指标花了1周的时间。

而恰逢全年最重


0x0164($s0)           ## 00000164
/* 000E4 80881334 8FBF001C */  lw      $ra, 0x001C($sp)
/* 000E8 80881338 8FB10018 */  lw      $s1, 0x0018($sp)
/* 000EC 8088133C 8FB000


    AVAILABLE_MIME_TYPES,
    FILES_PATH,
    MAX_FILE_SIZE,
    processFile,
} from "../services/fileUploadService";
import { CustomError } from "../../../common/errors/CustomError";
import { File } from "../models/File";

export interface FileController {
    getAll: Handler;
    downloadFile: Handler;
    handleUpload: Handler;
    saveFile: Handler;
    deleteOne: Handler;
    getOne: Handler;
}

export const fileController: FileController = {
    getAll: async (req, res) => {
        const files = await File.find({ archivedAt: null })
            .populate("user", ["username"])
            .sort({ createdAt: -1 })
            .exec();

        return res.status(200).json(files);
    },

    downloadFile: async (req, res, next) => {
        try {
            const file = await File.findById(req.params.id).exec();

            if (!file) {
                return next(new CustomError(400, "File not found."));
            }

            if (!!file.archivedAt) {
                return next(new CustomError(400, "File was removed."));
            }

            const storedFile = `${FILES_PATH}/${file.name}`;

            res.download(storedFile);
        } catch (e) {
            return next(new CustomError(500, e.message));
        }
    },

    handleUpload: async (req, res, next) => {
        if (!req.files?.userFile) {
            return next(new CustomError(400, "Failed to upload file."));
        }

        const { size, mimetype } = req.files.userFile as UploadedFile;

        const isTooLarge = size > MAX_FILE_SIZE;
        const isMimeUnsupported = !AVAILABLE_MIME_TYPES.includes(mimetype);

        if (isTooLarge) {
            return next(new CustomError(400, "Maximum file size is 3MB."));
        }

        if (isMimeUnsupported) {
            return next(new CustomError(400, "File extension not supported."));
        }

        try {
            const fileName = processFile(req.files.userFile as UploadedFile);

            return res.status(200).send({ name: fileName });
        } catch (e) {
            return next(new CustomError(500, e.message));
        }
    },

    saveFile: async (req, res, next) => {
        const file = new File({ name: req.body.name, user: req.user.id });

        try {
            const fileDoc = await file.save();

            res.status(201).json(fileDoc);
        } catch (e) {
            next(new CustomError(500, e.message));
        }
    },

    deleteOne: async (req, res, next) => {
        try {
            const file = await File.findById(req.params.id).exec();

            if (file.user.toString() !== req.user.id) {
                return next(
                    new CustomError(403, "Cannot delete other user's files.")
                );
            }

            file.archivedAt = new Date();
            await file.save();

            res.status(204).send();
        } catch (e) {
            next(new CustomError(500, e.message));
        }
    },

    getOne: async (req, res, next) => {
        try {
            const file = await File.findById(req.params.id, ["name"]).exec();

            res.status(200).json(file);
        } catch (e) {
            next(new CustomError(400, "File not found."));
        }
    },
};
const document: Document = app.activeDocument;
const scriptLayerName: string = 'Center-Script';

function isPathItem(item


import glob
import numpy as np
import os
import SimpleITK as sitk
import skimage.transform
import scipy.ndimage

from joblib import Parallel, delayed

def load_itk(filename):
    itkimage = sitk.ReadImage(filename)
    numpyImage = sitk.GetArrayFromImage(itkimage)
    numpyOrigin = np.array(list(reversed(itkimage.GetOrigin())))
    numpySpacing = np.array(list(reversed(itkimage.GetSpacing())))
    return numpyImage, numpyOrigin, numpySpacing

def save_itk(image, origin, spacing, filename):
    itkimage = sitk.GetImageFromArray(image, isVector=False)
    itkimage.SetSpacing(spacing)
    itkimage.SetOrigin(origin)
    sitk.WriteImage(itkimage, filename, True)

def world_2_voxel(worldCoord, origin, spacing):
    stretchedVoxelCoord = np.absolute(worldCoord - origin)
    voxelCoord = stretchedVoxelCoord / spacing
    return voxelCoord

def voxel_2_world(voxelCoord, origin, spacing):
    stretchedVoxelCoord = voxelCoord * spacing
    worldCoord = stretchedVoxelCoord + origin
    return worldCoord

def padding_to_512(imagePath):
	if os.path.isfile(imagePath.replace('1_1_1mm_lung_segmentations','1_1_1mm_512_x_512_lung_segmentations')) == False:
		lung_img, origin, spacing = load_itk(imagePath)
		anno_img, _, _ = load_itk(imagePath.replace('lung_segmentations','annotation_masks'))

		original_shape = lung_img.shape
		lung_img_512 = np.zeros((original_shape[0],512,512), dtype=lung_img.dtype)
		anno_img_512 = np.zeros((original_shape[0],512,512), dtype=anno_img.dtype)

		offset = (512 - original_shape[1])
		upper_offset = np.round(offset/2)
		lower_offset = offset - upper_offset

		new_origin = voxel_2_world([0,-upper_offset,-lower_offset],origin,spacing)

		lung_img_512[:,upper_offset:-lower_offset,upper_offset:-lower_offset] = lung_img
		anno_img_512[:,upper_offset:-lower_offset,upper_offset:-lower_offset] = anno_img

		new_origin = new_origin[::-1]
		new_spacing = spacing[::-1]
		save_itk(lung_img_512,new_origin,new_spacing,imagePath.replace('1_1_1mm_lung_segmentations','1_1_1mm_512_x_512_lung_segmentations'))
		save_itk(anno_img_512,new_origin,new_spacing,imagePath.replace('1_1_1mm_lung_segmentations','1_1_1mm_512_x_512_annotation_masks'))

if __name__ == "__main__":
    for subset in range(10):
    	print 'Processing subset', subset
        segLungDir = 'data\\1_1_1mm_lung_segmentations\\subset{}'.format(subset)
        imageNames = glob.glob("{}/*.mhd".format(segLungDir))
        Parallel(n_jobs=4)(delayed(padding_to_512)(imagePath) for imagePath in imageNames)


tType.TEAM_BOTTARI_CREATE, title)
                    emitEvent(BottariCreateUiEvent.CreateTeamBottariSuccess(createdBottariId))
                }.onFailure { emitEvent(BottariCreateUiEvent.CreateBottariFailure) }
        }
    }

    private fun logCreateBottariEvent(
        type: UiEventType,
        title: String,
    ) {
        BottariLogger.ui(
            type,
            mapOf("bottari_type" to type, "bottari_title" to title),
        )
    }

    companion object {
        private const val EMPTY_BOTTARI_TITLE = ""
        private const val KEY_BOTTARI_TITLE = "KEY_BOTTARI_TITLE"
        private const val KEY_BOTTARI_TYPE = "KEY_BOTTARI_TYPE"
        private const val ERROR_BOTTARI_TYPE = "[ERROR] 보따리 타입을 찾을 수 없습니다"

        fun Factory(
            defaultTitle: String,
            type: String,
        ): ViewModelProvider.Factory =
            viewModelFactory {
                initializer {
                    val stateHandle = createSavedStateHandle()
                    stateHandle[KEY_BOTTARI_TITLE] = defaultTitle
                    stateHandle[KEY_BOTTARI_TYPE] = type

                    BottariCreateViewModel(
                        stateHandle,
                        UseCaseProvider.createBottariUseCase,
                        UseCaseProvider.createTeamBottariUseCase,
                    )
                }
            }
    }
}
package com.bottari.presentation.view.edit.alarm

import android.content.res.ColorStateList
import android.os.Bundle
import android.view.View
import android.widget.TextView
import androidx.constraintlayout.widget.Group
import androidx.core.content.ContextCompat
import androidx.core.view.isVisible
import androidx.fragment.app.viewModels
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager.HORIZONTAL
import com.bottari.presentation.R
import com.bottari.presentation.common.base.BaseFragment
import com.bottari.presentation.common.extension.getParcelableCompat
import com.bottari.presentation.common.extension.safeArgument
import com.bottari.presentation.common.extension.showSnackbar
import com.bottari.presentation.databinding.FragmentAlarmEditBinding
import com.bottari.presentation.model.AlarmTypeUiModel
import com.bottari.presentation.model.AlarmUiModel
import com.bottari.presentation.util.AlarmScheduler
import com.bottari.presentation.view.common.decoration.ItemSpacingDecoration
import com.bottari.presentation.view.edit.alarm.adapter.RepeatDayAdapter
import com.bottari.presentation.view.edit.alarm.listener.OnDateClickListener
import com.shawnlin.numberpicker.NumberPicker
import java.time.LocalDate
import java.time.LocalTime

class AlarmEditFragment :
    BaseFragment<FragmentAlarmEditBinding>(FragmentAlarmEditBinding::inflate),
    OnDateClickListener {
    private val viewModel: AlarmEditViewModel by viewModels {
        AlarmEditViewModel.Factory(
            bottariId = safeArgument { getLong(ARG_BOTTARI_ID) },
            bottariTitle = safeArgument { getString(ARG_BOTTARI_TITLE) },
            alarm = safeArgument { getParcelableCompat(ARG_ALARM) },
        )
    }
    private val adapter: RepeatDayAdapter by lazy { RepeatDayAdapter(viewModel::updateDaysOfWeek) }
    private val scheduler: AlarmScheduler by lazy { AlarmScheduler() }
    private val hourPickers: List<NumberPicker> by lazy {
        listOf(
            binding.layoutNonRepeatAlarmTime.np


      await FirebaseService.instance.logAppOpen();
    } catch (e) {
      // Firebase initialization or app open logging failed: $e
    }
  }

  /// Trigger iOS local network permission dialog early in app lifecycle
  static Future<void> _triggerIOSLocalNetworkPermission() async {
    // Only run on iOS
    if (!Platform.isIOS) return;

    HttpClient? client;
    try {
      // Make a simple network request to a common local network address
      // This will trigger the iOS local network permission dialog
      client = HttpClient();
      client.connectionTimeout = const Duration(seconds: 1);

      // Try to connect to a common local network address
      // This will fail but will trigger the permission dialog
      final request = await client.getUrl(
        Uri.parse('http://192.168.1.1:8080/'),
      );
      await request.close().timeout(const Duration(milliseconds: 500));
    } catch (e) {
      // Expected to fail - we just want to trigger the permission dialog
      // This is intentional and expected behavior
    } finally {
      client?.close();
    }
  }
}
import 'package:flutter/material.dart';

/// Simple file extension utility for optimized icon and color lookups.
///
/// This utility provides efficient file extension processing with basic caching
/// to avoid repeated string operations when displaying file lists.
class FileExtensionCache {
  // Simple cache for file extensions to avoid repeated string splitting
  static final Map<String, String> _extensionCache = {};

  /// Gets the file extension from a filename with basic caching.
  static String _getExtension(String fileName) {
    return _extensionCache.putIfAbsent(fileName, () {
      final parts = fileName.split('.');
      if (parts.length < 2) return '';
      return parts.last.toLowerCase();
    });
  }

  /// Gets the appropriate icon for a file based on its extension.
  static IconData getFileIcon(String fileName) {
    final extension = _getExtension(fileName);

    // Simple switch statement for common file types
    switch (extension) {
      // Video files
      case 'mp4':
      case 'avi':
      case 'mkv':
      case 'mov':
      case 'wmv':
      case 'flv':
      case 'webm':
        return Icons.video_file;

      // Audio files
      case 'mp3':
      case 'wav':
      case 'flac':
      case 'aac':
      case 'ogg':
        return Icons.audio_file;

      // Image files
      case 'jpg':
      case 'jpeg':
      case 'png':
      case 'gif':
      case 'bmp':
      case 'webp':
        return Icons.image;

      // Document files
      case 'pdf':
        return Icons.picture_as_pdf;
      case 'txt':
      case 'doc':
      case 'docx':
        return Icons.description;

      // Archive files
      case 'zip':
      case 'rar':
      case '7z':
      case 'tar':
      case 'gz':
        return Icons.archive;

      // Code files
      case 'dart':
      case 'js':
      case 'ts':
      case 'html':
      case 'css':
      case 'json':
      case 'xml':
        return Icons.code;

      // Executable files
      case 'exe':
      case 'msi':
      case 'apk':
        return Icons.settings_applications;

      default:
        return Icons.insert_drive_file;
    }
  }

  /// Gets the appropriate color for a file based on its extension.
  static Color getFileColor(String fileName) {
    final extension = _getExtension(fileName);

    // Simple switch statement for common file types
    switch (extension) {
      // Video files - Red
      case 'mp4':
      case 'avi':
      case 'mkv':
      case


/**
\file  AppearancePage.h

\brief Declaration of AppearancePage class

https://www.med.upenn.edu/cbica/captk/

software@cbica.upenn.edu

Copyright (c) 2018 University of Pennsylvania. All rights reserved.

See COPYING file or https://www.med.upenn.edu/cbica/software-agreement.html

*/
#ifndef APPEARANCEPAGE_H
#define APPEARANCEPAGE_H

#include <QWidget>
#include "IPreferencePage.h"

namespace Ui {
class AppearancePage;
}

class AppearancePage : public QWidget, public IPreferencePage
{
    Q_OBJECT

public:
	enum ThemeType
	{
		Light = 0,
		Dark
	};

    explicit AppearancePage(QWidget *parent = nullptr);
    ~AppearancePage();

	Q_ENUM(ThemeType)

public slots:
	void OnSelectFontButtonClicked();
	void OnChangeTheme(int);

    /**
     * @brief OnOkay is called when the Appearance Page dialog is accepted. It prompts for user confirmation.
     */
	void OnOkay() override;

    /**
     * @brief OnCancel is called when the Appearance Page dialog is rejected. It resets the appearance to its previous configuration.
     */
	void OnCancel() override;
	void Restore() override;

private:
    Ui::AppearancePage *ui;

	//! ivars for handling cancel cases
    QFont m_SelectedFont, m_PreviousFont;
	QString m_SelectedStyleSheet, m_PreviousStyleSheet;
	ThemeType m_SelectedTheme, m_PreviousTheme;

    /**
     * @brief ApplySelectedAppearance applies whatever the currently selected font and stylesheet is to the global qApp.
     */
    void ApplySelectedAppearance();

    /**
     * @brief GetConfirmationFromUser raises a style-independent message box asking the user if they wish to keep their changes.
     * @return  true if the user presses "Apply", false if "Cancel" or if 10 seconds pass
     */
    bool GetConfirmationFromUser();

    /**
     * @brief SetApplicationPreferences saves the current selections to the global ApplicationPreferences (allowing them to be saved to disk later).
     */
    void UpdateAppearancePreferences();
};

#endif // APPEARANCEPAGE_H


ctive = Objective.create({
            title: monthlyObjectives[index].title,
            userId: userId,
            dailyObjectiveId: dailyObjective.id,
            monthlyObjectiveId: monthlyObjectives[index].id,
          });
          await manager.save(objective);
          objectives.push(objective);
        }
      });
    } catch (err) {
      throw new Error("FATAL: " + err);
    }
    return objectives;
  }
}
import xs, {Stream} from 'xstream';
import {DevToolEnabledSource} from '@cycle/base';
import concat from 'xstream/extra/concat';
import delay from 'xstream/extra/delay';
import debounce from 'xstream/extra/debounce';
import * as dagre from 'dagre';
import * as CircularJSON from 'circular-json';

interface InternalProducer {
  type?: string;
}

export interface StreamGraphNode {
  id: string;
  type: 'source' | 'stream' | 'sink';
  label?: string;
  stream?: Stream<any>;
  width: number;
  height: number;
  x?: number;
  y?: number;
}

export interface StreamGraphEdge {
  label?: string;
  points?: Array<{ x: number, y: number }>;
}

export interface Zap {
  id: string;
  type: 'next' | 'error' | 'complete';
  value?: any;
}

type Size = [number, number];

const SOURCE_NODE_SIZE: Size = [23, 23];
const COMMON_NODE_SIZE: Size = [23, 23];
const SINK_NODE_SIZE: Size = [40, 30];

const ZAP_INTERVAL = 70; // milliseconds, time between zapping of neighbor nodes

class StreamIdTable {
  private mutableIncrementingId: number;
  public map: Map<Stream<any>, number>;

  constructor() {
    this.mutableIncrementingId = 0;
    this.map = new Map<Stream<any>, number>();
  }

  getId(stream: Stream<any>): string {
    if (!this.map.has(stream)) {
      const id = this.mutableIncrementingId;
      this.map.set(stream, id);
      this.mutableIncrementingId += 1;
      return String(id);
    } else {
      return String(this.map.get(stream));
    }
  }
}

function makeSureNodeIsRegistered(graph: Dagre.Graph, idTable: StreamIdTable, stream: Stream<any>) {
  if (!graph.node(idTable.getId(stream))) {
    let node: StreamGraphNode;
    if (stream['_isCycleSource']) {
      node = {
        id: idTable.getId(stream),
        type: 'source',
        label: (<DevToolEnabledSource & Stream<any>> stream)._isCycleSource,
        stream: stream,
        width: SOURCE_NODE_SIZE[0],
        height: SOURCE_NODE_SIZE[1],
      }
    } else {
      node = {
        id: idTable.getId(stream),
        type: 'stream',
        stream: stream,
        width: COMMON_NODE_SIZE[0],
        height: COMMON_NODE_SIZE[1],
      };
    }
    graph.setNode(idTable.getId(stream), node);
  }
}

function visitEdge(graph: Dagre.Graph, idTable: StreamIdTable, inStream: Stream<any>, outStream: Stream<any>) {
  makeSureNodeIsRegistered(graph, idTable, inStream);
  makeSureNodeIsRegistered(graph, idTable, outStream);
  let label: string = '';
  if (outStream._prod && typeof (<InternalProducer> outStream._prod).type === 'string') {
    label = (<InternalProducer> outStream._prod).type;
  }
  graph.setEdge(idTable.getId(inStream), idTable.getId(outStream), {label});
  if (!inStream['_isCycleSource']) {
    traverse(graph,


}", string_match);

    if version().unwrap() < Version::parse("1.27.0").unwrap() || (profile == "debug" && string_match_not_set) {
        println!("cargo:rustc-env={}=1", string_match);
    }
}
pub mod definitions;
pub mod sdf_from_tm;
use wasm_bindgen::prelude::*;

#[rustfmt::skip]
#[wasm_bindgen]
pub fn rgba2laba(
    r: f64,
    g: f64,
    b: f64,
    a: f64,
    ref_x: f64,
    ref_y: f64,
    ref_z: f64,
) -> Vec<f64> {
    let mut r = r / 255.0;
    let mut g = g / 255.0;
    let mut b = b / 255.0;

    // Need lto = true in Cargo.toml to link pow
    r = if r > 0.04045 { ((r + 0.055) / 1.055).powf(2.4) } else { r / 12.92 };
    g = if g > 0.04045 { ((g + 0.055) / 1.055).powf(2.4) } else { g / 12.92 };
    b = if b > 0.04045 { ((b + 0.055) / 1.055).powf(2.4) } else { b / 12.92 };

    r *= 100.0;
    g *= 100.0;
    b *= 100.0;

    // Observer= 2° (Only use CIE 1931!)
    let mut x = r * 0.4124 + g * 0.3576 + b * 0.1805;
    let mut y = r * 0.2126 + g * 0.7152 + b * 0.0722;
    let mut z = r * 0.0193 + g * 0.1192 + b * 0.9505;

    x /= ref_x;
    y /= ref_y;
    z /= ref_z;

    x = if x > 0.008856 { x.powf(1.0 / 3.0) } else { x * 7.787 + 16.0 / 116.0 };
    y = if y > 0.008856 { y.powf(1.0 / 3.0) } else { y * 7.787 + 16.0 / 116.0 };
    z = if z > 0.008856 { z.powf(1.0 / 3.0) } else { z * 7.787 + 16.0 / 116.0 };

    let out_l = 116.0 * y - 16.0;
    let out_a = 500.0 * (x - y);
    let out_b = 200.0 * (y - z);

    vec![out_l, out_a, out_b, a]
}

#[wasm_bindgen]
pub fn rgba_laba_distance(
    r1: f64,
    g1: f64,
    b1: f64,
    a1: f64,
    r2: f64,
    g2: f64,
    b2: f64,
    a2: f64,
    ref_x: f64,
    ref_y: f64,
    ref_z: f64,
) -> f64 {
    let left = rgba2laba(r1, g1, b1, a1, ref_x, ref_y, ref_z);
    let right = rgba2laba(r2, g2, b2, a2, ref_x, ref_y, ref_z);
    let dist = ((right[0] - left[0]).powf(2.0) + (right[1] - left[1]).powf(2.0) + (right[2] - left[2]).powf(2.0)).sqrt();

    dist
}
<gh_stars>10-100
//! A library (far from anything) to generate icalendars
//! This implementation is still far from complete, I haven't even read the entire [spec](http://tools.ietf.org/html/rfc5545) yet.
//! Instead I implemented the parts I needed first.
//! More to come, contributions very welcome.
//!
//!
//! ## Structure
//! * [`Calendar`]s consist of


;
        pFontTagIter = pDstGalaxyName
            + swprintf(pDstGalaxyName, GALAXY_NAME_BUFFER_SIZE, L"%ls ", pShortGalaxyName);

        if (MR::isStarComplete(pGalaxyName)) {
            MR::addPictureFontTag(pFontTagIter, 80);
        }
        else {
            pFontTagIter = MR::addPictureFontTag(pFontTagIter, 55);
            pFontTagIter = MR::addPictureFontTag(pFontTagIter, 64);

            MR::addNumberFontTag(pFontTagIter, MR::getPowerStarNumSucceed(pGalaxyName));
        }
    }

    _30 = true;
}

// GalaxyMapGalaxyPlain::adjustTransInScreen

void GalaxyMapGalaxyPlain::init(const JMapInfoIter& rIter) {
    mNamePlate = new GalaxyNamePlate(nullptr, false);
    mNamePlate->initWithoutIter();
    mNamePlate->setShowBalloonNozzle(false);

    mGalaxyName = new(MR::getSceneHeapGDDR3(), 0) wchar_t[GALAXY_NAME_BUFFER_SIZE];
}

void GalaxyMapGalaxyPlain::appear() {
    LayoutActor::appear();
}

void GalaxyMapGalaxyPlain::kill() {
    LayoutActor::kill();
    mNamePlate->kill();
}

void GalaxyMapGalaxyPlain::movement() {
    LayoutActor::movement();
    mNamePlate->movement();
}

void GalaxyMapGalaxyPlain::calcAnim() {
    LayoutActor::calcAnim();
    mNamePlate->calcAnim();

    if (MR::isExecuteCalcAnimLayout(mNamePlate)) {
        adjustTransInScreen();
        mNamePlate->calcAnim();
    }
}

void GalaxyMapGalaxyPlain::draw() const {
    if (!MR::isDead(this)) {
        mNamePlate->draw();
    }
}

void GalaxyMapGalaxyPlain::show(const wchar_t* pGalaxyName, const char* pPaneName) {
    appear();

    mPaneName = pPaneName;

    MR::copyString(mGalaxyName, pGalaxyName, GALAXY_NAME_BUFFER_SIZE);

    _30 = true;
}

void GalaxyMapGalaxyPlain::control() {
    if (mPaneName != nullptr) {
        MR::setLayoutScalePosAtPaneScaleTrans(mNamePlate, mHost, mPaneName);
    }

    if (_30) {
        mNamePlate->show(mGalaxyName, true);
    }

    _30 = false;
}
#include "Game/LiveActor/Nerve.hpp"
#include "Game/Screen/ButtonPaneController.hpp"
#include "Game/Screen/FileSelectButton.hpp"
#include "Game/Screen/GalaxyMapGalaxyPlain.hpp"
#include "Game/Util/Functor.hpp"
#include "Game/Util/LayoutUtil.hpp"
#include "Game/Util/MessageUtil.hpp"
#include "Game/Util/ObjUtil.hpp"
#include "Game/Util/SoundUtil.hpp"

namespace {
    NEW_NERVE(FileSelectButtonNrvSelect, FileSelectButton, Select);
    NEW_NERVE(FileSelectButtonNrvWait, FileSelectButton, Wait);
    NEW_NERVE(FileSelectButtonNrvDisappear, FileSelectButton, Disappear);
};

FileSelectButton::FileSelectButton(const char* pName) :
    LayoutActor(pName, true)
{
    for (int i = 0; i < sizeof(mButtonCtrl) / sizeof(*mButtonCtrl); i++) {
        mButtonCtrl[i] = nullptr;
        mCallbackFunctor[i] = nullptr;
    }
}

void FileSelectButton::init(const JMapInfoIter& rIter) {
    initLayoutManager("FileSelect", 1);
    createPaneControl();


    AddAllServers();
        }

        void AddAllServers()
        {
            foreach (var dto in VMCertStoreSnapInEnvironment.Instance.LocalData.ServerList)
                AddServerNode(dto);
        }

        public void RefreshMethod(VMCertStoreServerDTO dto)
        {
            if (dto == null)
                RefreshAll();
            else
                AddServerNode(dto);
        }

        void AddServerNode(VMCertStoreServerDTO dto)
        {
            var node = new VMCertStoreServerNode(dto);
            this.Children.Add(node);
        }

        public void RefreshAll()
        {
            this.Children.Clear();

            AddAllServers();
        }

        protected override void OnAction(Microsoft.ManagementConsole.Action action, AsyncStatus status)
        {
            base.OnAction(action, status);

            switch((int)action.Tag)
            {
                case ACTION_ADD_SERVER:
                    AddServer();
                    break;
            }
        }

        async void AddServer()
        {

            try
            {
                var ServerDTO = VMCertStoreServerDTO.CreateInstance();
                ServerDTO.Server = "";
                var node = new VMCertStoreServerNode(ServerDTO);
                await node.DoLogin();
                if (node.ServerDTO.IsLoggedIn)
                {
                    VMCertStoreSnapInEnvironment.Instance.LocalData.AddServer(node.ServerDTO);
                    this.Children.Add(node);
                }
            }
            catch (Exception e)
            {
                MMCDlgHelper.ShowException(e);
            }
            finally
            {
                VMCertStoreSnapInEnvironment.Instance.SaveLocalData();
            }
        }
    }
}


= new PrettyFormat();
		await format.learnFromFile(file);
		setAttachedFormat(newData, format);
		return newData;
	}
}

export async function loadJsonFile(file: string, charset: BufferEncoding = DEFAULT_ENCODING): Promise<any> {
	file = abs(file);
	const targetFile = await loadFile(file, charset);
	const data = parse(targetFile.originalContent);
	setAttachedFile(data, targetFile);
	const format = new PrettyFormat();
	await format.learnFromFile(file, targetFile.originalContent);
	setAttachedFormat(data, format);
	return data;
}

export function parseJsonText(text: string): any {
	return parse(text);
}

function abs(p: string) {
	if (isAbsolute(p)) {
		return p;
	}
	return resolve(process.cwd(), p);
}

export function readCommentJsonFileSync(file: string, charset: BufferEncoding = DEFAULT_ENCODING): any {
	file = abs(file);
	const data = readFileSync(file, charset);
	return parse(data, undefined, true);
}
import { Express } from "express";
import { getPages, getTrimmedPosts } from "./caching";
import { Static } from "./app";
import { cookieAuth } from "./auth";
var app!: Express;
var initialized: boolean = false;

function invalid(res: any) {
	res.setHeader("asm-core.version", Static.version);
	res.setHeader("asm-core.identifier", Static.identfifier);
	res.setHeader("asm-core.status", "failure");
	res.send({ message: "failure", error: "invalid request" });
}

export function init(express: Express) {
	if (express.get != null) {
		app = express;
		initialized = true;

		app.get("/api/posts", cookieAuth, (req: any, res) => {
			if (req.asmuser == null) {
				res.send({ message: "failure", error: "not authenticated" });
				return;
			}

			let min = 0;
			if (req.query.p != null) {
				let query: number = Number(req.query.p);
				if (isNaN(query) || query < 0) invalid(res);
				else {
					if (query > getPages(25)) {
						res.send({
							message: "EoD",
							error: "invalid request"
						});
						return;
					}

					res.setHeader("asm-core.version", Static.version);
					res.setHeader("asm-core.identifier", Static.identfifier);
					res.setHeader("asm-core.status", "success");

					let start = query * 25;
					let end = query * 25 + 24;

					if (start == 0) end = 24;

					let response = {
						message: "success",
						posts: getTrimmedPosts(start, end)
					};

					res.send(response);
				}
			} else invalid(res);
		});
	} else throw new Error("Not passed a valid express object");
}
import { renderHook, act } from "@testing-library/react-hooks";
import { DerivedCategory, DerivedItem, useStore, useTodo } from "./state";

afterEach(() => {
  jest.useRealTimers();
});

function openItems(category: DerivedCategory) {
  return category.items.filter((item) => !item.done).length;
}

describe("sanity check", () => {
  it("should mark todo item as done", () => {
    const { result } = renderHook(() => useTodo());

    expect(openItems(result.current.derivedCategories[2])).toBe(1);
    act(() => {
      result.current.finishTodo("a");
    });

    expect(openItems(result.current.derivedCategories[2])).toBe(0);
  });

  it("should reset store between runs", () => {


m_KeyNames[3][15364] = "K1 Commander Bishop's Key"
m_KeyNames[3][15278] = "K2 Lt. Tuckerman's Key"
m_KeyNames[3][18524] = "K1 Flue Room Key"
m_KeyNames[3][18161] = "K2 Cathedral Key"
m_KeyNames[3][19279] = "K1 Maintenance Key"
m_KeyNames[3][19362] = "K2 Solomon's Key (door puzzle)"
m_KeyNames[3][19239] = "K3 Solomon's Key (drill shaft)"
m_KeyNames[3][19343] = "P1 Old Coin"
m_KeyNames[3][19302] = "P2 Ticket"
m_KeyNames[3][19465] = "P3 Hammer"
m_KeyNames[3][19448] = "P4 Ornate Star"
m_KeyNames[3][20447] = "K1 Boiler Room Key"
m_KeyNames[3][20240] = "P1 Embalming Fluid"
m_KeyNames[3][22578] = "K1 Generator Access Card"
m_KeyNames[3][22359] = "K2 Detonator Key"
m_KeyNames[3][22419] = "K2 Detonator Key (unused)"
m_KeyNames[3][23260] = "K1 Keycard Type A"
m_KeyNames[3][23490] = "K2 Keycard Type B (satellite dish tower)"
m_KeyNames[3][23454] = "K2 Keycard Type B (turret area)"
m_KeyNames[3][23352] = "P1 Blue Security Pass"
m_KeyNames[3][23322] = "P2 Yellow Security Pass (end)"
m_KeyNames[3][23537] = "P2 Yellow Security Pass (hangar access)"
m_KeyNames[3][23463] = "P2 Yellow Security Pass (satellite dish tower)"
m_KeyNames[3][24433] = "K1 Launch Code Card"
m_KeyNames[3][24322] = "P2 Code CD (silo)"
m_KeyNames[3][24253] = "P3 Code CD (watchtower)"
m_KeyNames[3][24434] = "P4 Hangar Access Pass"
m_KeyNames[3][25526] = "K1 Hut Key"
m_KeyNames[3][25374] = "P1 Crowbar (gate control)"
m_KeyNames[3][25456] = "P1 Crowbar (regular)"
m_KeyNames[3][25371] = "P1 Crowbar (tower)"
m_KeyNames[3][25446] = "P2 Gate Control Key"
m_KeyNames[3][26679] = "P1 Crowbar"
m_KeyNames[3][26444] = "P2 Lead Acid Battery"
m_KeyNames[3][26509] = "P3 Winch Starter"
m_KeyNames[3][27686] = "K1 Uli Key (end)"
m_KeyNames[3][27269] = "K1 Uli Key (start)"
m_KeyNames[3][27421] = "P1 Oceanic Mask (earth)"
m_KeyNames[3][27449] = "P1 Oceanic Mask (fire)"
m_KeyNames[3][27395] = "P1 Oceanic Mask (water)"
m_KeyNames[3][27368] = "P1 Oceanic Mask (wind)"
m_KeyNames[3][29220] = "K1 Vault Key"

function select_key_item(id)
    m_SelectedKeyItem = id
    if m_FilterEnabled then
        select_zones()
        update_filter()
    end
end

function select_quick_view(range, return_paths)
    m_SelectedRange = range
    m_UseReturnPaths = return_paths

    select_zones()
    if m_FilterEnabled then
        update_filter()
    end
end


             continue
            try:
                debug(f"removing old thumb: {f}")
                os.remove(os.path.join(self.cache_folder, f))
            except:
                pass

if __name__ == "__main__":
    if os.getuid() == 0:
        print("Error: Do not run this as root")
        exit(1)

    parser = argparse.ArgumentParser(description='Cinnamon Spices Thumbs Updater',
                                         epilog="spice-type should be 'applet', 'desklet', 'extension' or 'theme'.")
    parser.add_argument("--update-all", dest="update_all_thumbs", action="store_const", const=True,
                        help="Update all spices thumbs to their latest versions.")

    choices = ["applet", "desklet", "extension", "theme"]

    ex_group = parser.add_mutually_exclusive_group()
    ex_group.add_argument("--update", dest="update_thumbs_of_type", action="store", choices=choices, metavar="<spice-type>",
                        help="Update spices cache of a given type")

    args = parser.parse_args()

    if len(sys.argv) == 1:
      parser.print_help()
      exit(1)

    def update_all_thumbs():
      for _type in choices:
        h = Harvester(_type)
        h.refresh()

    def update_thumbs_of_type():
      h = Harvester(args.update_thumbs_of_type)
      h.refresh()

    exit(0)


ds.ls(sl=True, type="joint")

        if target_skinClusters:
            for skinCluster in target_skinClusters:
                lib_skinCluster.rebind_skinCluster(skinCluster)

        if influences:
            lib_skinCluster.rebind_skinCluster_from_influence(influences)

    @maya_ui.undo_chunk("Prune Small Weights")
    @maya_ui.error_handler
    def prune_small_weights(self):
        """Prune small weights."""
        sel_dag_nodes = cmds.ls(sl=True, dag=True, shapes=True, ni=True)
        if not sel_dag_nodes:
            cmds.error("Select geometry to prune small weights.")

        convert_weight.prune_small_weights(sel_dag_nodes, threshold=0.005)

    @maya_ui.undo_chunk("Remove Unused Influences")
    @maya_ui.error_handler
    def remove_unused_influences(self):
        """Remove unused influences."""
        shapes = cmds.ls(sl=True, dag=True, shapes=True, ni=True)
        if not shapes:
            cmds.error("Select geometry to remove unused influences.")

        for shape in shapes:
            skinCluster = lib_skinCluster.get_skinCluster(shape)
            if not skinCluster:
                cmds.warning(f"No skinCluster found: {shape}")
                continue

            lib_skinCluster.remove_unused_influences(skinCluster)

    @maya_ui.undo_chunk("Average Skin Weights")
    @maya_ui.error_handler
    def average_skin_weights(self):
        """Average skin weights."""
        sel_components = cmds.filterExpand(sm=[28, 31, 46])
        if not sel_components:
            cmds.error("Select components to average skin weights.")

        convert_weight.average_skin_weights(sel_components)

    @maya_ui.undo_chunk("Average Skin Weights Shell")
    @maya_ui.error_handler
    def average_skin_weights_shell(self):
        """Average skin weights shell."""
        meshs = cmds.ls(sl=True, dag=True, type="mesh", ni=True)
        if not meshs:
            cmds.error("Select mesh to average skin weights shell.")

        for mesh in meshs:
            convert_weight.average_skin_weights_shell(mesh)

    def _get_skinClusters(self):
        """Get the skinClusters."""
        shapes = cmds.ls(sl=True, dag=True, type="deformableShape", objectsOnly=True, ni=True)
        skinClusters = cmds.ls(sl=True, type="skinCluster")

        target_skinClusters = []
        if shapes:
            for shape in shapes:
                skinCluster = lib_skinCluster.get_skinCluster(shape)
                if skinCluster and skinCluster not in target_skinClusters:
                    target_skinClusters.append(skinCluster)
        if skinClusters:
            for skinCluster in skinClusters:
                if skinCluster not in target_skinClusters:
                    target_skinClusters.append(skinCluster)

        return target_skinClusters

def show_ui():
    """Show the main window."""
    window_name = f"{__name__}MainWindow"
    maya_qt.delete_widget(window_name)

    # Create the main window.
    main_window = MainWindow(parent=maya_qt.get_maya_pointer(), object_name=window_name, window_title="Skin Weights Tools")
    main_window.show()
    main_window.resize(0, 0)


        \
        TCudaBuffer<V, TMapping> & values,                                   \
        bool compareGreater,                                                 \
        ui32 offset,                                                         \
        ui32 bits,                                                           \
        ui32 stream) {                                                       \
        ::RadixSortImpl(keys, values, compareGreater, offset, bits, stream); \
    }

Y_MAP_ARGS(
    Y_CATBOOST_CUDA_F_IMPL_PROXY,
    (float, uchar, TMirrorMapping),
    (float, char, TMirrorMapping),
    (float, ui16, TMirrorMapping),
    (float, i16, TMirrorMapping),
    (float, ui32, TMirrorMapping),
    (float, i32, TMirrorMapping),
    (float, float, TMirrorMapping),
    (ui32, uchar, TMirrorMapping),
    (ui32, char, TMirrorMapping),
    (ui32, ui16, TMirrorMapping),
    (ui32, i16, TMirrorMapping),
    (ui32, ui32, TMirrorMapping),
    (ui32, i32, TMirrorMapping),
    (ui32, float, TMirrorMapping),
    (ui64, i32, TMirrorMapping),
    (float, uint2, TMirrorMapping),
    (ui64, ui32, TMirrorMapping),
    (bool, ui32, TMirrorMapping));

Y_MAP_ARGS(
    Y_CATBOOST_CUDA_F_IMPL_PROXY,
    (float, uchar, TSingleMapping),
    (float, char, TSingleMapping),
    (float, ui16, TSingleMapping),
    (float, i16, TSingleMapping),
    (float, ui32, TSingleMapping),
    (float, i32, TSingleMapping),
    (float, float, TSingleMapping),
    (ui32, uchar, TSingleMapping),
    (ui32, char, TSingleMapping),
    (ui32, ui16, TSingleMapping),
    (ui32, i16, TSingleMapping),
    (ui32, ui32, TSingleMapping),
    (ui32, i32, TSingleMapping),
    (ui32, float, TSingleMapping),
    (ui64, i32, TSingleMapping),
    (float, uint2, TSingleMapping),
    (ui64, ui32, TSingleMapping),
    (bool, ui32, TSingleMapping));

Y_MAP_ARGS(
    Y_CATBOOST_CUDA_F_IMPL_PROXY,
    (float, uchar, TStripeMapping),
    (float, char, TStripeMapping),
    (float, ui16, TStripeMapping),
    (float, i16, TStripeMapping),
    (float, ui32, TStripeMapping),
    (float, i32, TStripeMapping),
    (float, float, TStripeMapping),
    (ui32, uchar, TStripeMapping),
    (ui32, char, TStripeMapping),
    (ui32, ui16, TStripeMapping),
    (ui32, i16, TStripeMapping),
    (ui32, ui32, TStripeMapping),
    (ui32, i32, TStripeMapping),
    (ui32, float, TStripeMapping),
    (ui32, ui64, TStripeMapping),
    (ui64, i32, TStripeMapping),
    (float, uint2, TStripeMapping),
    (ui64, ui32, TStripeMapping),
    (ui64, ui64, TStripeMapping),
    (bool, ui32, TStripeMapping));

#undef Y_CATBOOST_CUDA_F_IMPL
#undef Y_CATBOOST_CUDA_F_IMPL_PROXY

// ReorderBins

template <typename TMapping, typename TIndex>
static void ReorderBinsImpl(
    TCudaBuffer<


 @G--" GTEST_FLAG_PREFIX_
    "list_tests@D, you can alternatively set "
    "the corresponding\n"
    "environment variable of a flag (all letters in upper-case). For example, "
    "to\n"
    "disable colored text output, you can either specify "
    "@G--" GTEST_FLAG_PREFIX_
    "color=no@D or set\n"
    "the @G" GTEST_FLAG_PREFIX_UPPER_
    "COLOR@D environment variable to @Gno@D.\n"
    "\n"
    "For more information, please read the " GTEST_NAME_
    " documentation at\n"
    "@G" GTEST_PROJECT_URL_ "@D. If you find a bug in " GTEST_NAME_
    "\n"
    "(not one in your own code or tests), please report it to\n"
    "@G<" GTEST_DEV_EMAIL_ ">@D.\n";

static bool ParseGoogleTestFlag(const char* const arg) {
  return ParseBoolFlag(arg, kAlsoRunDisabledTestsFlag,
                       &GTEST_FLAG(also_run_disabled_tests)) ||
         ParseBoolFlag(arg, kBreakOnFailureFlag,
                       &GTEST_FLAG(break_on_failure)) ||
         ParseBoolFlag(arg, kCatchExceptionsFlag,
                       &GTEST_FLAG(catch_exceptions)) ||
         ParseStringFlag(arg, kColorFlag, &GTEST_FLAG(color)) ||
         ParseStringFlag(arg, kDeathTestStyleFlag,
                         &GTEST_FLAG(death_test_style)) ||
         ParseBoolFlag(arg, kDeathTestUseFork,
                       &GTEST_FLAG(death_test_use_fork)) ||
         ParseBoolFlag(arg, kFailFast, &GTEST_FLAG(fail_fast)) ||
         ParseStringFlag(arg, kFilterFlag, &GTEST_FLAG(filter)) ||
         ParseStringFlag(arg, kInternalRunDeathTestFlag,
                         &GTEST_FLAG(internal_run_death_test)) ||
         ParseBoolFlag(arg, kListTestsFlag, &GTEST_FLAG(list_tests)) ||
         ParseStringFlag(arg, kOutputFlag, &GTEST_FLAG(output)) ||
         ParseBoolFlag(arg, kBriefFlag, &GTEST_FLAG(brief)) ||
         ParseBoolFlag(arg, kPrintTimeFlag, &GTEST_FLAG(print_time)) ||
         ParseBoolFlag(arg, kPrintUTF8Flag, &GTEST_FLAG(print_utf8)) ||
         ParseInt32Flag(arg, kRandomSeedFlag, &GTEST_FLAG(random_seed)) ||
         ParseInt32Flag(arg, kRepeatFlag, &GTEST_FLAG(repeat)) ||
         ParseBoolFlag(arg, kShuffleFlag, &GTEST_FLAG(shuffle)) ||
         ParseInt32Flag(arg, kStackTraceDepthFlag,
                        &GTEST_FLAG(stack_trace_depth)) ||
         ParseStringFlag(arg, kStreamResultToFlag,
                         &GTEST_FLAG(stream_result_to)) ||
         ParseBoolFlag(arg, kThrowOnFailureFlag, &GTEST_FLAG(throw_on_failure));
}

#if GTEST_USE_OWN_FLAGFILE_FLAG_
static void LoadFlagsFromFile(const std::string& path) {
  FILE* flagfile = posix::FOpen(path.c_str(), "r");
  if (!flagfile) {
    GTEST_LOG_(FATAL) << "Unable to open file \"" << GTEST_FLAG(flagfile)
                      << "\"";
  }
  std::string contents(ReadEntireFile(flagfile));
  posix::FClose(flagfile);
  std::vector<std::string> lines;
  SplitString(contents, '\n', &lines);
  for (size_t i = 0; i < lines.size(); ++i) {
    if (lines[i].empty())
      continue;
    if (!ParseGoogleTestFlag(lines[i].c_str()))
      g_help_flag = true;
  }
}
#endif  // GTEST_USE_OWN_FLAGFILE_FLAG_

// Parses the command line for Googl


="status">
          加载中...

          加载中...

          加载中...

          加载中...

          加载中...

          加载中...

          加载中...

          加载中...

        <mdbsnippet>

              加载中...

              加载中...

              加载中...

              加载中...

              加载中...

              加载中...

              加载中...

              加载中...

        </mdbsnippet>

    文本对齐

Bootstrap中的微调器内置雷姆 s  currentColor 和显示：inline-flex  。这意味着它们可以轻松地调整大小，重新着色并快速对齐。

边缘

采用保证金工具喜欢


ce range.</param>
        void WriteNearFarScalar(double nearDistance, double nearValue, double farDistance, double farValue);

        /// <summary>
        /// Writes the value expressed as four values <c>[NearDistance, NearValue, FarDistance, FarValue]</c>.
        /// </summary>
        /// <param name="dates">The dates at which the value is specified.</param>
        /// <param name="values">The values corresponding to each date.</param>
        void WriteNearFarScalar(IList<JulianDate> dates, IList<NearFarScalar> values);

        /// <summary>
        /// Writes the value expressed as four values <c>[NearDistance, NearValue, FarDistance, FarValue]</c>.
        /// </summary>
        /// <param name="dates">The dates at which the value is specified.</param>
        /// <param name="values">The values corresponding to each date.</param>
        /// <param name="startIndex">The index of the first element to write.</param>
        /// <param name="length">The number of elements to write.</param>
        void WriteNearFarScalar(IList<JulianDate> dates, IList<NearFarScalar> values, int startIndex, int length);
    }
}


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

#include "ec_commands.h"
#include "gpio.h"
#include "led_common.h"
#include "led_onoff_states.h"

#define LED_OFF_LVL	1
#define LED_ON_LVL	0

const int led_charge_lvl_1;
const int led_charge_lvl_2 = 100;

struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = {
	[STATE_CHARGING_LVL_1]       = {{EC_LED_COLOR_BLUE,  2 * LED_ONE_SEC},
					{EC_LED_COLOR_AMBER, 2 * LED_ONE_SEC} },
	[STATE_CHARGING_LVL_2]	     = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} },
	[STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_BLUE,  LED_INDEFINITE} },
	[STATE_DISCHARGE_S0]	     = {{EC_LED_COLOR_BLUE,  LED_INDEFINITE} },
	[STATE_DISCHARGE_S3]	     = {{EC_LED_COLOR_AMBER, 1 * LED_ONE_SEC},
					{LED_OFF,            3 * LED_ONE_SEC} },
	[STATE_DISCHARGE_S5]         = {{LED_OFF,            LED_INDEFINITE} },
	[STATE_BATTERY_ERROR]        = {{LED_OFF,	     1 * LED_ONE_SEC},
					{EC_LED_COLOR_AMBER, 1 * LED_ONE_SEC} },
	[STATE_FACTORY_TEST]         = {{EC_LED_COLOR_BLUE,  LED_INDEFINITE} },
};
BUILD_ASSERT(ARRAY_SIZE(led_bat_state_table) == LED_NUM_STATES);

const enum ec_led_id supported_led_ids[] = { EC_LED_ID_BATTERY_LED };

const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids);

void led_set_color_battery(enum ec_led_colors color)
{
	switch (color) {
	case EC_LED_COLOR_BLUE:
		gpio_set_level(GPIO_LED_FULL_L, LED_ON_LVL);
		gpio_set_level(GPIO_LED_CHRG_L, LED_OFF_LVL);
		break;
	case EC_LED_COLOR_AMBER:
		gpio_set_level(GPIO_LED_FULL_L, LED_OFF_LVL);
		gpio_set_level(GPIO_LED_CHRG_L, LED_ON_LVL);
		break;
	default: /* LED_OFF and other unsupported colors */
		gpio_set_level(GPIO_LED_FULL_L, LED_OFF_LVL);
		gpio_set_level(GPIO_LED_CHRG_L, LED_OFF_LVL);
		break;
	}
}

void led_get_brightness_range(enum ec_led_id led_id, uint8_t *brightness_range)
{
	brightness_range[EC_LED_COLOR_BLUE] = 1;
	brightness_range[EC_LED_COLOR_AMBER] = 1;
}

int led_set_brightness(enum ec_led_id led_id, const uint8_t *brightness)
{
	if (brightness[EC_LED_COLOR_BLUE] != 0)
		led_set_color_battery(EC_LED_COLOR_BLUE);
	else if (brightness[EC_LED_COLOR_AMBER] != 0)
		led_set_color_battery(EC_LED_COLOR_AMBER);
	else
		led_set_color_battery(LED_OFF);

	return EC_SUCCESS;
}


: Maybe<Scalars['String']>;
};
import {
    createUser as createUserDB,
    updateUserStatus as activateUserDB,
    updateUserImei as updateUserImeiDB,
    updateAddPostToUser,
    findUserByNamePaging,
    updatePointsToUser,
    updateUserBadge,
    findUserById,
    updatePointsApprovedToUser
} from "../../../src/operations/DB/user";

import { user } from "../../utilS";
import mongoose from "mongoose";
import dotenv from "dotenv";
import {ObjectId} from "bson";
dotenv.config();

const assert = require("chai").assert;
const expect = require('chai').expect;

// Example of unit test using BDD.
// Reference https://martinfowler.com/bliki/GivenWhenThen.html

describe("User Tests", () => { // Contex
    before(function (done) {
        mongoose.connect(process.env.MONGO_URI, { useNewUrlParser: true });
        const db = mongoose.connection;
        db.on('error', console.error.bind(console, 'connection error'));
        db.once('open', function () {
            console.log('We are connected to test database!');
            done();
        });
    });
    describe("When the user created has data: ", () => { // Scenary
        it("result should be the same user created with all defaults values defined ", (done) => { // Result
            createUserDB(user).then((data) => {
                assert.equal(data._doc.email, user.email);
                done();
            }).catch(done);

        });
    });
    describe("When the user need to be activated with its Id: ", () => { // Scenary
        it("result should be the user set to an activated state ", (done) => { // Result
            activateUserDB("5d5f331e4bedae2a7c2fa1e8", "A").then((data) => {
                assert.equal(data._doc.status, "A");
                done();
            }).catch(done);

        });
    });

    describe("When a user creates a post and the post is asigned to the user: ", () => { // Scenary
        it("result should be the user with a new post", (done) => { // Result
            updateAddPostToUser("5d5f331e4bedae2a7c2fa1e8", "5d719bba6bc5c43f14a8fae5").then((data) => {
                assert.equal(data._doc.contents.length, 1);
                done();
            }).catch(done);

        });
    });

    describe("When a user has new badge ", () => { // Scenary
        it("result should be the user with a new badge", (done) => { // Result
            updateUserBadge(new ObjectId("5d5f331e4bedae2a7c2fa1e8"), "COMPA").then((data) => {
                assert.equal(data._doc.badge, "COMPA");
                done();
            }).catch(done);

        });
    });

    describe("When the user need to be change its imei: ", () => { // Scenary
        it("result should be the user set to a new imei", (done) => { // Result
            updateUserImeiDB("5d5f331e4bedae2a7c2fa1e8", "12345678").then((data) => {
                assert.equal(data._doc.imei, "12345678");
                done();
            }).catch(done);

        });
    });
    describe("When users are searched by name: ", () => { // Scenary
        it("result should be all users that match with the name (no case sensitive) ", (done) => { // Result
            findUserByNamePaging("TeS", 0).then((data) => {
                expect(data[0]._doc).to.have.property("_id");
                expect(data[0].