 {
      return this.get('graphLayout.ty')*this.getSize().h;
    },
    set(k, v) {
      this.set('graphLayout.ty', v/this.getSize().h);
      return v;
    }
  }),

  zoomAndDrag(scale, translate) {

    let mapG = this.d3l().select("g.map"),
        zoomables = this.d3l().selectAll(".zoomable"),
        projector = this.get('projector'),
        t = projector.initialTranslate,
        ds = projector.scale() / projector.resolution,
        rs = scale/ds,
        tx = projector.translate()[0]*rs - t[0] * scale,
        ty = projector.translate()[1]*rs - t[1] * scale;

    mapG.node().__kis_tx = translate[0];
    mapG.node().__kis_ty = translate[1];
    mapG.node().__kis_s = scale;
    zoomables
      .transition()
      .duration(120)
      .ease(d3.easeLinear)
      .on("start", () => {
        this.get('refreshDebouncer') && Ember.run.cancel(this.get('refreshDebouncer'));
      })
      .on("end", () => {
        this.set('refreshDebouncer', Ember.run.debounce(this, this.refreshMap, 360));
      })
      .attrs({
        "transform": `${d3lper.translate({tx: translate[0] - tx, ty: translate[1] - ty})} scale(${rs})`
      });

    /*if (isChrome()) { //désactivé car marche mal
      mapG.selectAll("#layers .shape").each(function() {

        let el = d3.select(this),
          elBox = el.node().getBBox(),
          cx = elBox.x + elBox.width / 2,
          cy = elBox.y + elBox.height / 2;

        el.attr("transform", `${d3lper.translate({tx: -cx*(1/rs-1), ty: -cy*(1/rs-1)})} scale(${1/rs})`);

      });
    }*/

  },

  refreshDebouncer: null,
  refreshMap() {
    let mapG = this.d3l().select("g.map"),
        mapGNode = mapG.node();
    this.get('graphLayout').beginPropertyChanges();

    this.setProperties({
      "graphLayout.zoom": mapGNode.__kis_s,
      relTx: mapGNode.__kis_tx,
      relTy: mapGNode.__kis_ty
    });

    this.scaleProjector(this.get('projector'));
    this.get('graphLayout').endPropertyChanges();
    this.d3l().selectAll(".zoomable").attr("transform", null);
    this.projectAndDraw();
  },

  zoomAndDragChange: function() {

    this.updateTxTy(this.get('relTx'), this.get('relTy'));

    let projector = this.get('projector'),
        ds = projector.scale() / projector.resolution,
        tx = projector.translate()[0] - projector.initialTranslate[0]*ds,
        ty = projector.translate()[1] - projector.initialTranslate[1]*ds,
        shiftX = tx - this.get('relTx'),
        shiftY = ty - this.get('relTy');

    if (Math.abs(ds - this.get('graphLayout.zoom')) > 0.1
        || Math.abs(shiftX) > 0.1 || Math.abs(shiftY) > 0.1) {

      let {w, h} = this.getSize(),
		      vOf = this.get('graphLayout').vOffset(h),
          hOf = this.get('graphLayout').hOffset(w),
          m = this.get('graphLayout.margin');

      if (Math.abs(shiftX) <= 0.1 && Math.abs(shiftY) <= 0.1) {
        this.get('d3Zoom').toPoint(
          this.


V0YWwgc3Bpa2VzLiBBbm90aGVyIHN1Z2dlc3RlZCBkZXNpZ24gaW5jbHVkZWQgZGFnZ2VyLXNoYXBlZCBlYXJ0aHdvcmtzLiBUaGVzZSBiZXJtcyB3aWxsIGd1aWRlIHZpc2l0b3JzIHRvIGEgbWVzc2FnZSBhcmVhIHRoYXQgY29tbXVuaWNhdGVzIG1lc3NhZ2VzIGJvdGggbGluZ3Vpc3RpY2FsbHkgYW5kIG5vbi1saW5ndWlzdGljYWxseS4gUnVkaW1lbnRhcnkgaW5mb3JtYXRpb24gd291bGQgYmUgc2hvd24gdGhyb3VnaCBmYWNlcyBpbmRpY2F0aW5nIGhvcnJvciwgc3VjaCBhcyB0aGUgaGF1bnRpbmcgZmlndXJlIGluIEVkdmFyZCBNdW5jaOKAmXMg4oCcVGhlIFNjcmVhbS7igJ0gVGhhdCB3b3VsZCBiZSBhY2NvbXBhbmllZCBieSB3cml0dGVuIHdvcmRzIHRoYXQgdGhlIHBhbmVsIGhvcGVkIHdvdWxkIGNvbnZleSB0aGlzOiDigJxUaGlzIHBsYWNlIGlzIGEgbWVzc2FnZSDigKYgYW5kIHBhcnQgb2YgYSBzeXN0ZW0gb2YgbWVzc2FnZXMg4oCmIHBheSBhdHRlbnRpb24gdG8gaXQhIFNlbmRpbmcgdGhpcyBtZXNzYWdlIHdhcyBpbXBvcnRhbnQgdG8gdXMuIFdlIGNvbnNpZGVyZWQgb3Vyc2VsdmVzIHRvIGJlIGEgcG93ZXJmdWwgY3VsdHVyZS4gVGhpcyBwbGFjZSBpcyBub3QgYSBwbGFjZSBvZiBob25vciAuLi4gbm8gaGlnaGx5IGVzdGVlbWVkIGRlZWQgaXMgY29tbWVtb3JhdGVkIGhlcmUgLi4uIG5vdGhpbmcgdmFsdWVkIGlzIGhlcmUu4oCdCuKAk0RhbmllbCBSb3RoYmVyZw==
	//
	// Big Names Pull Cash from V.C. Fund Over Political Contributions - The New York Times
	// September 12, 2006
	// https://dealbook.nytimes.com/2006/09/12/big-names-pull-cash-from-venture-capital-fund-over-political-contributions
	// VGhlIE5ldyBZb3JrIFRpbWVzCkRlYWxCb29rIHwgQmlnIE5hbWVzIFB1bGwgQ2FzaCBmcm9tIFYuQy4gRnVuZCBPdmVyIFBvbGl0aWNhbCBDb250cmlidXRpb25zClNlYXJjaApCaWcgTmFtZXMgUHVsbCBDYXNoIGZyb20gVi5DLiBGdW5kIE92ZXIgUG9saXRpY2FsIENvbnRyaWJ1dGlvbnMKQnkgd3JpdGVyClNlcHRlbWJlciAxMiwgMjAwNiA3OjQyIGFtCl


 == m_parentType)
    {
        ctl::ComPtr<xaml_controls::IMediaPlayerElement> spOwnerMPE;
        IFC(m_wrOwnerParent.As(&spOwnerMPE))
        if (spOwnerMPE.Get())
        {
            IFC(spOwnerMPE.Cast<MediaPlayerElement>()->get_IsFullWindow(value));
        }
    }
Cleanup:
#endif // DISABLE_FULL_WINDOW
    return hr;
}

_Check_return_ HRESULT MediaTransportControls::SetMediaPlayerElementFullWindow(ctl::ComPtr<xaml_controls::IMediaPlayerElement> spMediaPlayer, BOOLEAN value)
{
#if false // DISABLE_FULL_WINDOW
    IFC_RETURN(spMediaPlayer->put_IsFullWindow(value));
#endif // DISABLE_FULL_WINDOW
    return S_OK;
}

_Check_return_ HRESULT
MediaTransportControls::SetFullWindow(_In_ BOOLEAN value)
{
    HRESULT hr = S_OK;
#if false // DISABLE_FULL_WINDOW
    if (MTCParent_MediaPlayerElement == m_parentType)
    {
        ctl::ComPtr<xaml_controls::IMediaPlayerElement> spOwnerMPE;
        IFC(m_wrOwnerParent.As(&spOwnerMPE))
        if (spOwnerMPE.Get())
        {
            // Changing IsFullWindow will update the parent of our parent (e.g. the LayoutRoot grid)
            // We need to complete the event call and then let the reparenting happen after that.
            // This will ensure that no peers are referenced while changing the parent.
            IFC(GetXamlDispatcherNoRef()->RunAsync(
                MakeCallback(
                SetMediaPlayerElementFullWindow, spOwnerMPE, value)));
        }
    }
Cleanup:
#endif // DISABLE_FULL_WINDOW
    return hr;
}

_Check_return_ HRESULT
MediaTransportControls::GetStretch(_Out_ xaml_media::Stretch *value)
{
    HRESULT hr = S_OK;

    if (MTCParent_MediaPlayerElement == m_parentType)
    {
        ctl::ComPtr<xaml_controls::IMediaPlayerElement> spIMPE;
        IFC(m_wrOwnerParent.As(&spIMPE))
        if (spIMPE.Get())
        {
            ctl::ComPtr<MediaPlayerElement> spMPE =
                static_cast<MediaPlayerElement*>(ctl::impl_cast<MediaPlayerElementGenerated>(spIMPE.Get()));

            IFC(spMPE->get_Stretch(value));
        }
    }

Cleanup:
    return hr;
}
_Check_return_ HRESULT
MediaTransportControls::SetStretch(_In_ xaml_media::Stretch value)
{
    HRESULT hr = S_OK;

    if (MTCParent_MediaPlayerElement == m_parentType)
    {
        ctl::ComPtr<xaml_controls::IMediaPlayerElement> spIMPE;
        IFC(m_wrOwnerParent.As(&spIMPE))
        if (spIMPE.Get())
        {
            ctl::ComPtr<MediaPlayerElement> spMPE =
                static_cast<MediaPlayerElement*>(ctl::impl_cast<MediaPlayerElementGenerated>(spIMPE.Get()));

            IFC(spMPE->put_Stretch(value));
        }
    }

Cleanup:
    return hr;
}

_Check_return_ HRESULT
MediaTransportControls::GetVolume(_Out_ DOUBLE *value)
{
    HRESULT hr = S_OK;

    *value = 0;
    if (MTCParent_MediaPlayerElement == m_parentType)
    {
        if (m_spMediaPlayer)
        {
            IFC(m_spMediaPlayer->get_Volume(value));
        }
    }

Cleanup:
    return hr;
}

_Check_return_ HRESULT
MediaTransportControls::SetVolume(_In_ DOUBLE value)
{
    HRESULT hr = S_OK;

    if (MTCParent_MediaPlayerElement == m_parentType)
    {
        if (m_spMediaPlayer)


elseif 2 == L4_2 then
      L5_2 = A0_2[4]
      L6_2 = L5_2
      L5_2 = L5_2.fCDC3DEA9
      L7_2 = "kToTopMenu"
      L5_2(L6_2, L7_2)
      L6_2 = A0_2
      L5_2 = A0_2.F0447962DA9E61E54
      L7_2 = "kNone"
      L5_2(L6_2, L7_2)
    elseif 3 == L4_2 then
      L5_2 = A0_2[4]
      L6_2 = L5_2
      L5_2 = L5_2.fCDC3DEA9
      L7_2 = "kToTopMenu"
      L5_2(L6_2, L7_2)
      L6_2 = A0_2
      L5_2 = A0_2.F0447962DA9E61E54
      L7_2 = "kNone"
      L5_2(L6_2, L7_2)
    elseif 4 == L4_2 then
      L5_2 = A0_2[4]
      L6_2 = L5_2
      L5_2 = L5_2.fCDC3DEA9
      L7_2 = "kToTopMenu"
      L5_2(L6_2, L7_2)
      L6_2 = A0_2
      L5_2 = A0_2.F0447962DA9E61E54
      L7_2 = "kNone"
      L5_2(L6_2, L7_2)
    elseif 5 == L4_2 then
      L5_2 = A0_2[4]
      L6_2 = L5_2
      L5_2 = L5_2.fCDC3DEA9
      L7_2 = "kToTopMenu"
      L5_2(L6_2, L7_2)
      L6_2 = A0_2
      L5_2 = A0_2.F0447962DA9E61E54
      L7_2 = "kNone"
      L5_2(L6_2, L7_2)
    elseif 6 == L4_2 then
      L5_2 = A0_2[4]
      L6_2 = L5_2
      L5_2 = L5_2.fCDC3DEA9
      L7_2 = "kToTopMenu"
      L5_2(L6_2, L7_2)
      L6_2 = A0_2
      L5_2 = A0_2.F0447962DA9E61E54
      L7_2 = "kNone"
      L5_2(L6_2, L7_2)
    elseif 7 == L4_2 then
      L5_2 = A0_2[4]
      L6_2 = L5_2
      L5_2 = L5_2.fCDC3DEA9
      L7_2 = "kToTopMenu"
      L5_2(L6_2, L7_2)
      L6_2 = A0_2
      L5_2 = A0_2.F0447962DA9E61E54
      L7_2 = "kNone"
      L5_2(L6_2, L7_2)
    elseif 8 == L4_2 then
      L5_2 = A0_2[4]
      L6_2 = L5_2
      L5_2 = L5_2.fCDC3DEA9
      L7_2 = "kToTopMenu"
      L5_2(L6_2, L7_2)
      L6_2 = A0_2
      L5_2 = A0_2.F0447962DA9E61E54
      L7_2 = "kNone"


)
	runtime.ReadMemStats(m)

	system.MemAllocated = humanize.Bytes(m.Alloc)
	system.MemTotal = humanize.Bytes(m.TotalAlloc)
	system.MemSys = humanize.Bytes(m.Sys)
	system.Lookups = humanize.Comma(int64(m.Lookups))
	system.MemMallocs = humanize.Comma(int64(m.Mallocs))
	system.MemFrees = humanize.Comma(int64(m.Frees))

	system.HeapAlloc = humanize.Bytes(m.HeapAlloc)
	system.HeapSys = humanize.Bytes(m.HeapSys)
	system.HeapInuse = humanize.Bytes(m.HeapInuse)
	system.HeapIdle = humanize.Bytes(m.HeapIdle)
	system.HeapReleased = humanize.Bytes(m.HeapReleased)
	system.HeapObjects = humanize.Comma(int64(m.HeapObjects))

	system.StackInuse = humanize.Bytes(m.StackInuse)
	system.StackSys = humanize.Bytes(m.StackSys)

	system.MSpanSys = humanize.Bytes(m.MSpanSys)
	system.MSpanInuse = humanize.Bytes(m.MSpanInuse)
	system.MCacheSys = humanize.Bytes(m.MCacheSys)
	system.MCacheInuse = humanize.Bytes(m.MCacheInuse)
	system.BuckHashSys = humanize.Bytes(m.BuckHashSys)
	system.GCSys = humanize.Bytes(m.GCSys)
	system.OtherSys = humanize.Bytes(m.OtherSys)

	system.NextGC = humanize.Bytes(m.NextGC)
	system.AverageGC = fmt.Sprintf("%.1fs", float64(uptime.Seconds())/float64(m.NumGC))
	system.LastGC = fmt.Sprintf("%.1fs", float64(time.Now().UnixNano()-int64(m.LastGC))/1000/1000/1000)
	system.PauseTotalNs = fmt.Sprintf("%.1fs", float64(m.PauseTotalNs)/1000/1000/1000)
	system.PauseNs = fmt.Sprintf("%.3fs", float64(m.PauseNs[(m.NumGC+255)%256])/1000/1000/1000)
	system.NumGC = humanize.Comma(int64(m.NumGC))
}

func Dashboard(c *fiber.Ctx) error {
	u, _ := jwt.User(c)
	week := time.Now().AddDate(0, -1, 0)

	// Don't allow regular users to see this page.
	if u.Role < models.Moderator {
		return c.Render("err", fiber.Map{
			"Title": "Page not found",
			"User":  u,
		})
	}

	// Get styles.
	if c.Query("data") == "styles" {
		styles, err := storage.FindStyleCardsCreatedOn(time.Now())
		if err != nil {
			return c.Render("err", fiber.Map{
				"Title": "Styles not found",
				"User":  u,
			})
		}

		return c.Render("core/dashboard", fiber.Map{
			"Title":        "Dashboard",
			"User":         u,
			"Styles":       styles,
			"RenderStyles": true,
		})
	}

	// Get users.
	if c.Query("data") == "users" {
		users, err := storage.FindUsersCreatedOn(time.Now())
		if err != nil {
			return c.Render("err", fiber.Map{
				"Title": "Users not found",
				"User":  u,
			})
		}

		return c.Render("core/dashboard", fiber.Map{
			"Title":       "Dashboard",
			"User":        u,
			"Users":       users,
			"RenderUsers": true,
		})
	}

	// Get System statistics.
	getSystemStatus()

	// Get User statistics.
	dashUsers := new(models.DashStats)
	userCount, err := dashUsers.GetCounts("users")
	if err != nil {
		lo


BOOST_ASIO_LOCAL_DATAGRAM_PROTOCOL_HPP

#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)

#include <boost/asio/detail/config.hpp>

#if defined(BOOST_ASIO_HAS_LOCAL_SOCKETS) \
  || defined(GENERATING_DOCUMENTATION)

#include <boost/asio/basic_datagram_socket.hpp>
#include <boost/asio/detail/socket_types.hpp>
#include <boost/asio/local/basic_endpoint.hpp>

#include <boost/asio/detail/push_options.hpp>

namespace lslboost {
namespace asio {
namespace local {

/// Encapsulates the flags needed for datagram-oriented UNIX sockets.
/**
 * The lslboost::asio::local::datagram_protocol class contains flags necessary for
 * datagram-oriented UNIX domain sockets.
 *
 * @par Thread Safety
 * @e Distinct @e objects: Safe.@n
 * @e Shared @e objects: Safe.
 *
 * @par Concepts:
 * Protocol.
 */
class datagram_protocol
{
public:
  /// Obtain an identifier for the type of the protocol.
  int type() const
  {
    return SOCK_DGRAM;
  }

  /// Obtain an identifier for the protocol.
  int protocol() const
  {
    return 0;
  }

  /// Obtain an identifier for the protocol family.
  int family() const
  {
    return AF_UNIX;
  }

  /// The type of a UNIX domain endpoint.
  typedef basic_endpoint<datagram_protocol> endpoint;

  /// The UNIX domain socket type.
  typedef basic_datagram_socket<datagram_protocol> socket;
};

} // namespace local
} // namespace asio
} // namespace lslboost

#include <boost/asio/detail/pop_options.hpp>

#endif // defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
       //   || defined(GENERATING_DOCUMENTATION)

#endif // BOOST_ASIO_LOCAL_DATAGRAM_PROTOCOL_HPP
//
// detail/win_iocp_handle_write_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef BOOST_ASIO_DETAIL_WIN_IOCP_HANDLE_WRITE_OP_HPP
#define BOOST_ASIO_DETAIL_WIN_IOCP_HANDLE_WRITE_OP_HPP

#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)

#include <boost/asio/detail/config.hpp>

#if defined(BOOST_ASIO_HAS_IOCP)

#include <boost/asio/error.hpp>
#include <boost/asio/detail/addressof.hpp>
#include <boost/asio/detail/bind_handler.hpp>
#include <boost/asio/detail/buffer_sequence_adapter.hpp>
#include <boost/asio/detail/fenced_block.hpp>
#include <boost/asio/detail/handler_alloc_helpers.hpp>
#include <boost/asio/detail/handler_invoke_helpers.hpp>
#include <boost/asio/detail/operation.hpp>

#include <boost/asio/detail/push_options.hpp>

namespace lslboost {
namespace asio {
namespace detail {

template <typename ConstBufferSequence, typename Handler>
class win_iocp_handle_write_op : public operation
{
public:
  BOOST_ASIO_DEFINE_HANDLER_PTR(win_iocp_handle_write_op);

  win_iocp_handle_write_op(const ConstBufferSequence& buffers, Handler& handler)
    : operation(&win_iocp_handle_write_op::do_complete),
      buffers_(buffers),
      handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
  {
  }

  static void do_complete


, "iq");
    }

    public static XmlPullParser getMessageParser(String stanza) {
        return getParser(stanza, "message");
    }

    public static XmlPullParser getPresenceParser(String stanza) {
        return getParser(stanza, "presence");
    }

    public static XmlPullParser getParser(String string) {
        return getParser(string, null);
    }

    public static XmlPullParser getParser(String string, String startTag) {
        return getParser(new StringReader(string), startTag);
    }

    private static XmlPullParser getParser(Reader reader, String startTag) {
        XmlPullParser parser;
        try {
            parser = SmackXmlParser.newXmlParser(reader);
            if (startTag == null) {
                while (parser.getEventType() != XmlPullParser.Event.START_ELEMENT) {
                    parser.next();
                }
                return parser;
            }
            boolean found = false;

            while (!found) {
                if ((parser.next() == XmlPullParser.Event.START_ELEMENT) && parser.getName().equals(startTag))
                    found = true;
            }

            if (!found)
                throw new IllegalArgumentException("Can not find start tag '" + startTag + "'");
        } catch (XmlPullParserException e) {
            throw new RuntimeException(e);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        return parser;
    }

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

package org.jivesoftware.smack;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;

import org.jivesoftware.smack.packet.Presence;
import org.jivesoftware.smack.test.SmackTestCase;
import org.jivesoftware.smack.util.StringUtils;
import org.mockito.internal.util.RemoveFirstLine;

/**
 * Tests the Roster functionality by creating and removing roster entries.
 *
 * @author Gaston Dombiak
 */
public class RosterSmackTest extends SmackTestCase {

    /**
     * Constructor for RosterSmackTest.
     * @param name TODO javadoc me please
     */
    public RosterSmackTest(String name) {
        super(name);
    }

    /**
     * 1. Create entries in roster groups
     * 2. Iterate on the groups and remove the entry from each group
     * 3. Check that the entries are kept as unfiled entries
     */
    public void testDeleteAllRosterGroupEntries() {
        try {
            // Add a new roster entry
            Roster roster = getConnection(0).getRoster();

            CountDownLatch latch = new CountDownLatch(2);
            setupCountdown(latch, roster);

            roster.createEntry(getBareJID(1), "gato11", new String[] { "Friends", "Family" });
            roster.createEntry(getBareJID(2), "gato12", new String[] { "Family" });

            waitForCountdown(latch, roster, 2);

            final CountDownLatch removeLatch = new CountDownLatch(3);
            RosterListener latchCounter = new RosterListener() {
                @Override
                public void presenceChanged(Presence presence) {}

                @Override
                public void entriesUpdated(Collection<String> addresses) {
                    removeLatch.countDown();
                }

                @Override
                public v


 s.is_zero_at(time + s.level))
    }
}

#[derive(Debug)]
pub struct Scanner {
    level: usize,
    range: usize,
}

impl Scanner {
    pub fn new(level: usize, range: usize) -> Self {
        Self {
            level: level,
            range: range,
        }
    }

    pub fn is_zero_at(&self, time: usize) -> bool {
        time % ((self.range - 1) * 2) == 0
    }

    // Returns the severity of being triggered.
    // If not triggered, returns 0.
    pub fn severity(&self, time: usize) -> usize {
        if self.is_zero_at(time) {
            self.level * self.range
        } else {
            0
        }
    }
}

impl str::FromStr for Scanner {
    // TODO: Add a type
    type Err = ();

    fn from_str(s: &str) -> Result<Self, Self::Err> {
        // TODO: remove the unwrap dammmit
        let list: Vec<usize> = s.split(": ").map(|x| x.parse().unwrap()).collect();
        if list.len() != 2 {
            return Err(());
        }

        Ok(Self{
            level: list[0],
            range: list[1],
        })
    }
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_trigger_intensity() {
        let firewall = Firewall::new(
            vec![(0,3), (1,2), (4,4), (6,4)].iter().map(|x| Scanner::new(x.0, x.1)).collect()
        );

        assert_eq!(firewall.traverse(0), 24);
    }
}

const PUZZLE: &'static str = "Packet Scanners";
const INPUT: &'static str = r"
0: 3
1: 2
2: 4
4: 6
6: 4
8: 6
10: 5
12: 8
14: 8
16: 6
18: 8
20: 6
22: 10
24: 8
26: 12
28: 12
30: 8
32: 12
34: 8
36: 14
38: 12
40: 18
42: 12
44: 12
46: 9
48: 14
50: 18
52: 10
54: 14
56: 12
58: 12
60: 14
64: 14
68: 12
70: 17
72: 14
74: 12
76: 14
78: 14
82: 14
84: 14
94: 14
96: 14
";
<filename>src/sstable/manager/level_n.rs<gh_stars>0
use crate::cache::{LRUEntry, ShardLRUCache};
use crate::collections::skip_list::skipmap::SrSwSkipMap;
use crate::compaction::level_n::start_compact;
use crate::db::db_iter::InternalKeyValue;
use crate::db::key_types::{DBKey, RawUserKey};
use crate::db::{Value, MAX_LEVEL};
use crate::sstable::manager::level_iter::LevelNIterator;
use crate::sstable::table_cache::TableCache;
use crate::sstable::table_handle::{TableReadHandle, TableWriteHandle};
use crate::sstable::TableID;
use crate::Result;
use crossbeam_channel::{Receiver, Sender};
use std::collections::{BTreeMap, VecDeque};
use std::num::NonZeroUsize;
use std::sync::atomic::{AtomicU64, AtomicUsize, Ordering};
use std::sync::{Arc, RwLock};
use std::thread::JoinHandle;

/// Struct for adding and removing sstable files.
pub struct LevelNManager {
    db_path: String,
    /// map: <max key, tableID>
    level_tables:
        [std::sync::RwLock<BTreeMap<(RawUserKey, TableID), Arc<TableReadHandle>>>; MAX_LEVEL],
    level_sizes: [AtomicU64; MAX_LEVEL],
    next_table_id: [AtomicU64; MAX_LEVEL],

    pub(crate) index_cache: Arc<ShardLRUCache<TableID, TableCache>>,
    senders: Vec<Sender<bool>>,
    handles: RwLock<Vec<JoinHandle<()>>>,
    next_to_compact: AtomicUsize,
}

unsafe impl Sync for LevelNManager {}
unsafe impl Send for LevelNManager {}

impl LevelNManager {
    /// Open all the sstables at `db_path` when initializing DB.
    pub fn open_tables(
        db_path


%*
		- 分为：**皮质肾单位**（**多**且小，髓袢短，口径：入大于出）；**近髓肾单位**（少且大，髓袢长，口径出入一致）
		- 组成：**肾小体**（**肾小球**+**肾小囊**）+**肾小管**（**近端小管** + **髓袢** + **远端小管**）
		- *下图为近髓肾单位（皮质肾单位无直小血管，即右侧 U 形；两者都有管周毛细血管）*
		- ![](./_image/2025-05-08/6b6d3e14fbf7fd7910095112b412cddc.jpg){ width="66%" }
	- **集合管**：和远曲小管相连，**不在肾单位中**，皮质集合管 → 近髓集合管 → 大集合管 → 经肾乳头 → 肾盂
	- **球旁器**（主要分布在**皮质肾单位**）
		- **球旁细胞**：入球小动脉中膜内的肌上皮样细胞，有分泌颗粒，内含**肾素**（调节入球小动脉**直径**）
		- **致密斑**：位于**远曲小管**起始部，感受小管液中 **NaCl** 含量变化（反馈至球旁细胞调节尿量生成）
		- **球外系膜细胞**：存在于出入球小动脉间的吞噬细胞
		- ![](./_image/2025-05-08/24bf5c8b05cd80397e1b0a56ba9ae2dc.jpg){ width="45%" }
	- **滤过膜**
		- **内层**：毛细血管内皮细胞层；有**窗孔**；**水**、**小分子溶质**可自由通过；**负电荷**
		- **中间层**：毛细血管基膜；组成：胶原、粘连蛋白、蛋白多糖；**负电荷**
		- **外层**：肾小囊上皮细胞（足细胞）；足突相互交错形成**裂隙**；存在裂孔素**阻止蛋白质漏出**
		- **选择透过性**
			- **分子量大小**（机械屏障）：葡萄糖可以，血浆蛋白不可以（2.0nm; 4.2nm）
			- **电荷选择**（电学屏障）：负电荷难以通过
- **肾病综合征**：水肿
- **肾脏的血供**
	- **两套毛细血管床**：肾小球/肾小管周毛细血管；**肾小管


ACAO
				celula = retornaConteudo(row.getCell(1, Row.CREATE_NULL_AS_BLANK));
				problemas += validarSiglaLotacao(siglas, celula.trim(), orgaoUsuario, linha, lotacao, 20);

				if(problemas == null || "".equals(problemas.toString())) {
					lot.setSiglaLotacao(celula.toUpperCase().trim());
				}

				//ESTADO
				celula = retornaConteudo(row.getCell(2, Row.CREATE_NULL_AS_BLANK));

				if(uf == null || !uf.getSigla().equalsIgnoreCase(celula)) {
					uf = CpDao.getInstance().consultaSiglaUF(celula.toUpperCase());
				}

				if(uf == null) {
					problemas += "Linha " + linha +": UF não encontrada" + System.getProperty("line.separator");
				} else {
					//LOCALIDADE DA LOTACAO
					celula = retornaConteudo(row.getCell(3, Row.CREATE_NULL_AS_BLANK));
					loc.setUF(uf);
					loc.setNmLocalidade(celula);
					problemas += validarLocalidadeLotacao(localidades, linha, loc);
				}

				/*
				 * Alteracao 24/04/2020
				 */
				//Lotacao Pai
				//celula = retornaConteudo(row.getCell(3, Row.CREATE_NULL_AS_BLANK));
				//String lotacaopaidescricao = celula;
				celula = retornaConteudo(row.getCell(4, Row.CREATE_NULL_AS_BLANK));
				String lotacaopaisigla = celula;
				if(!celula.equals("")) {
					DpLotacao lo = CpDao.getInstance().consultarLotacaoPorOrgaoEId(orgaoUsuario, lotacaopaisigla);
					if(lo!=null) {
						lot.setLotacaoPai(lo);
					} else {
						problemas += "Linha " + linha +": SIGLA de LOTAÇÃO PAI não encontrada, se você deseja informar "
								+ lotacaopaisigla + " como unidade pai, é necessário cadastrá-lo antes de importar essa planilha" + System.getProperty("line.separator");
					}
				}

				//LOTACAO EXTERNA
				celula = retornaConteudo(row.getCell(5, Row.CREATE_NULL_AS_BLANK));
				problemas += validarIsExternaLotacao(celula.trim(), linha);

				if(problemas == null || "".equals(problemas.toString())) {
					lot.setIsExternaLotacao(montarIsExternaLotacao(celula.trim()));
				}

				if(problemas == null || "".equals(problemas.toString())) {
					for (CpLocalidade lo : localidades) {
						if(lo.getNmLocalidade().equalsIgnoreCase(loc.getNmLocalidade())) {
							lot.setLocalidade(lo);
						}
					}

					if(lot.getLocalidade() == null || lot.getLocalidade().getIdLocalidade() == null) {
						lot.setLocalidade(CpDao.getInstance().consultarLocalidadesPorNomeUF(loc));
					}

					lot.setDataInicio(data);
					lot.setOrgaoUsuario(orgaoUsuario);
					lista.add(lot);
				}
			}
			if(problemas == null || "".equals(problemas.toString())) {
            	for (DpLotacao dpLotacao : lista) {
	            	CpDao.getInstance().iniciarTransacao();
	    			CpDao.getInstance().gravarComHistorico(dpLotacao, cadastrante);


/*
 * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
 * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
*/

using System;
using Python.Runtime;
using QuantConnect.Algorithm.Framework.Alphas.Analysis;
using QuantConnect.Python;

namespace QuantCo


; 0x34
   107b4:	e8bd80f0 	pop	{r4, r5, r6, r7, pc}
l107b8:		e3550001 	cmp	r5, #1
   107bc:	9a000010 	bls	0x10804
   107c0:	e28d1004 	add	r1, sp, #4
   107c4:	e3a0000c 	mov	r0, #12
   107c8:	e58d0000 	str	r0, [sp]
   107cc:	e3a0001d 	mov	r0, #29
   107d0:	e3a02000 	mov	r2, #0
   107d4:	e8810081 	stm	r1, {r0, r7}
   107d8:	e1a0100d 	mov	r1, sp
   107dc:	e1a00004 	mov	r0, r4
   107e0:	e58d701c 	str	r7, [sp, #28]
   107e4:	ebffff80 	bl	0x105ec
   107e8:	e3500000 	cmp	r0, #0
   107ec:	15941030 	ldrne	r1, [r4, #48]	; 0x30
   107f0:	128f0f4d 	addne	r0, pc, #308	; 0x1092c
   107f4:	1affffeb 	bne	0x107a8
   107f8:	e1a01006 	mov	r1, r6
   107fc:	e1a00004 	mov	r0, r4
   10800:	ebffff7b 	bl	0x105f4

f10804:		e1a00005 	mov	r0, r5
   10808:	eaffffe8 	b	0x107b0
l1080c:		e92d47f0 	push	{r4, r5, r6, r7, r8, r9, sl, lr}
   10810:	e1a07001 	mov	r7, r1
   10814:	e1a08003 	mov	r8, r3
   10818:	e1a06000 	mov	r6, r0
   1081c:	e1a09002 	mov	r9, r2
   10820:	e1a05002 	mov	r5, r2
   10824:	ebffffb4 	bl	0x106fc
   10828:	e3590000 	cmp	r9, #0
   1082c:	e1a04000 	mov	r4, r0
   10830:	05901030 	ldreq	r1, [r0, #48]	; 0x30
   10834:	028f0f46 	addeq	r0, pc, #280	; 0x10954
   10838:	0a000064 	beq	0x109d0
   1083c:	e3540000 	cmp	r4, #0
   10840:	028f0f4d 	addeq	r0, pc, #308	; 0x1097c
   10844:	01a01006 	moveq	r1, r6
   10848:	0a000060 	beq	0x109d0
   1084c:	e59430a8 	ldr	r3, [r4, #168]	; 0xa8
   10850:	e0872009 	add	r2, r7, r9
   10854:	e1520003 	cmp	r2, r3
   10858:	9a00005f 	bls	0x109dc
   1085c:	e5901030 	ldr	r1, [r0, #48]	; 0x30
   10860:	e28f0f4d 	add	r0, pc, #308	; 0x1099c
   10864:


eul de flammes']={[0]=6.0,},
  ['Linceul de toiles']={[0]=8.0,},
  ['Linceul de vents']={[0]=10.0,},
  ['Lit de mort']={[0]=10.0,},
  ['Lucioles']={[0]=40.0,},
  ['Lucioles (farouche)']={[0]=40.0,},
  ['Lésions cérébrales']={[0]=30.0,},
  ['Léthargie cristalline']={[0]=15.0,},
  ['Léthargie druidique']={[0]=15.0,},
  ['Léthargie profonde']={[0]=15.0,},
  ['Magie sauvage']={[0]=30.0,},
  ['Main de Ragnaros']={[0]=2.0,},
  ['Main de Thaurissan']={[0]=5.0,},
  ['Mains couvertes de mousse']={[0]=180.0,},
  ['Maintien de givre']={[0]=10.0,},
  ['Maladie affaiblissante']={[0]=30.0,},
  ['Maladie du Champignon magenta']={[0]=1200.0,},
  ['Maladie térébrante']={[0]=300.0,},
  ['Maladresse']={[0]=30.0,},
  ['Maladresse II']={[0]=30.0,},
  ['Maladresse III']={[0]=30.0,},
  ['Malédiction d\'Hakkar']={[0]=120.0,},
  ['Malédiction d\'agonie']={[0]=24.0,},
  ['Malédiction d\'idiotie']={[0]=120.0,},
  ['Malédiction d\'impuissance']={[0]=120.0,},
  ['Malédiction de Brandefeu']={[0]=300.0,},
  ['Malédiction de Gehennas']={[0]=300.0,},
  ['Malédiction de Lucifron']={[0]=300.0,},
  ['Malédiction de Marduk']={[0]=5.0,},
  ['Malédiction de Mornecoeur']={[0]=180.0,},
  ['Malédiction de Shazzrah']={[0]=300.0,},
  ['Malédiction de Stalvan']={[0]=600.0,},
  ['Malédiction de Thule']={[0]=240.0,},
  ['Malédiction de Timmy']={[0]=60.0,},
  ['Malédiction de Tuten\'kash']={[0]=900.0,},
  ['Malédiction de faiblesse']={[0]=120.0,},
  ['Malédiction de fatigue']={[0]=12.0,},
  ['Malédiction de guérison']={[0]=180.0,},
  ['Malédiction de l\'ombre']={[0]=300.0,},
  ['Malédiction de la Banshee']={[0]=12.0,},
  ['Malédiction de la corne noire']={[0]=300.0,},
  ['Malédiction de l’oeil']={[0]=120.0,},
  ['Malédiction de témérité']={[0]=120.0,},
  ['Malédiction de vengeance']={[0]=900.0,},
  ['Malédiction des Cognepeurs']={[0]=60.0,},
  ['Malédiction des Magram défunts']={[0]=900.0,},
  ['Malédiction des Mort-bois']={[0]=120.0,},
  ['Malédiction des Tribus']={[0]=1800.0,},
  ['Malédiction des langages']={[0]=30.0,},
  ['Malédiction des éléments']={[0]=300.0,


.cancel, null);

                    // 顯示對話框
                    d.show();
                }
                // 如果沒有錄音檔，啟動錄音元件
                else {
                    goToRecord(recordFile);
                }

                break;
            case R.id.set_location:
                // 啟動地圖元件用的Intent物件
                Intent intentMap = new Intent(this, MapsActivity.class);

                // 設定儲存的座標
                intentMap.putExtra("lat", item.getLatitude());
                intentMap.putExtra("lng", item.getLongitude());
                intentMap.putExtra("title", item.getTitle());
                intentMap.putExtra("datetime", item.getLocaleDatetime());

                // 啟動地圖元件
                startActivityForResult(intentMap, START_LOCATION);
                break;
            case R.id.set_alarm:
                // 設定提醒日期時間
                processSetAlarm();
                break;
            case R.id.select_color:
                // 啟動設定顏色的Activity元件
                startActivityForResult(
                        new Intent(this, ColorActivity.class), START_COLOR);
                break;
        }

    }

    // 設定提醒日期時間
    private void processSetAlarm() {
        Calendar calendar = Calendar.getInstance();

        if (item.getAlarmDatetime() != 0) {
            // 設定為已經儲存的提醒日期時間
            calendar.setTimeInMillis(item.getAlarmDatetime());
        }

        // 讀取年、月、日、時、分
        int year = calendar.get(Calendar.YEAR);
        int month = calendar.get(Calendar.MONTH);
        int day = calendar.get(Calendar.DAY_OF_MONTH);
        int hour = calendar.get(Calendar.HOUR_OF_DAY);
        int minute = calendar.get(Calendar.MINUTE);

        // 儲存設定的提醒日期時間
        final Calendar alarm = Calendar.getInstance();

        // 設定提醒時間
        TimePickerDialog.OnTimeSetListener timeSetListener =
                new TimePickerDialog.OnTimeSetListener() {
            @Override
            public void onTimeSet(TimePicker view,
                                  int hourOfDay, int minute) {
                alarm.set(Calendar.HOUR_OF_DAY, hourOfDay);
                alarm.set(Calendar.MINUTE, minute);

                item.setAlarmDatetime(alarm.getTimeInMillis());
            }
        };

        // 選擇時間對話框
        final TimePickerDialog tpd = new TimePickerDialog(
                this, timeSetListener, hour, minute, true);

        // 設定提醒日期
        DatePickerDialog.OnDateSetListener dateSetListener =
                new DatePickerDialog.OnDateSetListener() {
            @Override
            public void onDateSet(DatePicker view,
                                  int year,
                                  int monthOfYear,
                                  int dayOfMonth) {
                alarm.set(Calendar.YEAR, year);
                alarm.set(Calendar.MONTH, monthOfYear);
                alarm.set(Calendar.DAY_OF_MONTH, dayOfMonth);

                // 繼續選擇提醒時間
                tpd.show();
            }
        };

        // 建立與顯示選擇日期對話框
        final DatePickerDialog dpd = new DatePickerDialog(
                this, dateSetListener, year, month, day);
        dpd.show();
    }

    private void goToRecord(File recordFile) {
        // 錄音
        Intent recordIntent = new Intent(this, RecordActivity.class);
        recordIntent.putExtra("fileName", recordFile.getAbsolutePath());
        startActivityForResult(recordIntent, START_RECORD);
    }

    private File configFileName(String prefix, String extension) {
        // 如果記事資料已經有檔案名稱
        if (item.getFileName() !=


 960px) {
	.recipe1-text {padding-top: var(--w960-padding-top-recipe1-text);}
}
@media screen and (max-width: 910px) {
	.recipe1-text {
		font-size: var(--w910-font-recipe1-text);
		height: var(--w910-height-recipe1-text);
		padding-top: var(--w910-padding-top-recipe1-text);
	}
}
@media screen and (max-width: 860px) {
	.checkbox {
		display: block;
		margin-bottom: 0px;
		margin-top: 10px;
		margin-left: 0px;
	}
	.r2bottom {height: var(--w860-height-r2bottom);}
	.r2bottom div {
		font-size: var(--w860-font-r2bottom-div);
		max-height: var(--w860-height-r2bottom-div);
	}
	.r2bottom span {font-size: var(--w860-font-r2bottom-span);}
}
@media screen and (max-width: 820px) {
	.r3binner div {
		font-size: var(--w820-font-r3binner-div);
		max-height: var(--w820-height-r3binner-div);
	}
	.r3category {font-size: var(--w820-font-r3category); }
	.r3time {font-size: var(--w820-font-r3small);}
	.r3calories {font-size: var(--w820-font-r3small);}
	.r3created {font-size: var(--w820-font-r3small);}
}
@media screen and (max-width: 800px) {
	.recipe1-text {padding-top: var(--w800-padding-top-recipe1-text);}
}
@media screen and (max-width: 770px) {
	.recipe2 {width: calc(33.33% - 20px);}
	.r2bottom {height: var(--height-r2bottom);}
	.r2bottom div {
		font-size: var(--font-r2bottom-div);
		max-height: var(--height-r2bottom-div);
	}
	.r2bottom span {font-size: var(--font-r2bottom-span);}
}
@media screen and (max-width: 750px) {
	#recipenav {height: 92px;}
	.recipenavleft {
		float: none;
		text-align: left;
		margin-top: 10px;
		width: calc(100% - 20px);
	}
	.recipenavright {width: 100%;}
	.btn-default {width: 40px;}
	.btn-icon {padding-right: var(--padding-right-btn-icon);}
	.search-cont {width: var(--width-search-cont-mobile);}
	.recipe1-text {
		padding-left: 12px;
		padding-right: 12px;
		padding-top: var(--w750-padding-top-recipe1-text);
		width: calc(100% - 24px);
	}
}
@media screen and (max-width: 700px) {
	.recipe1 {width: 50%;}
	.recipe1-text {
		font-size: var(--w700-font-recipe1-text);
		height: var(--w700-height-recipe1-text);
		padding-left: 15px;
		padding-right: 15px;
		padding-top: var(--w700-padding-top-recipe1-text);
		width: calc(100% - 30px);
	}
	.recipe2cont {width: calc(100% - 16px);}
	.recipe2 {
		width: ca


key: Preferences.Key<T>,
		defaultValue: T? = null
	): Flow<Option<T>> =
		dataStore.data.map { pref ->
			pref[key].toOption()
		}.map { r ->
			r.onNone {
				defaultValue.toOption().onSome { dv ->
					dataStore.updateData {
						val pref = it.toMutablePreferences()
						pref[key] = dv
						pref
					}
				}
			}
		}

	fun <T> getPrefs(keys: Set<Preferences.Key<T>>): Flow<Map<Preferences.Key<T>, Option<T>>> =
		dataStore.data.map { prefs ->
			keys.associateWith {
				prefs[it].toOption()
			}
		}

	/*
	CAUTION: Blocking code.
	Never use them below unless absolutely necessary
	 */
	fun <T> getPrefBlocking(key: Preferences.Key<T>): Option<T> = runBlocking {
		dataStore.data.map { pref ->
			pref[key].toOption()
		}.first()
	}

	/*
	 double blocking. could have better performance with something like
	 parZip(
			{ getPref(key1).first() },
			{ getPref(key2).first() }
		) { a, b -> Pair(a, b) }
		but this triggers recomposition for some reason.
	 */
	fun <A, B> getPrefsBlocking(
		key1: Preferences.Key<A>,
		key2: Preferences.Key<B>
	): Pair<Option<A>, Option<B>> = runBlocking {
		parZip(
			{ getPrefBlocking(key1) },
			{ getPrefBlocking(key2) }
		) { a, b -> Pair(a, b) }
	}
	/*
	End Blocking code
	 */

}//package modules.common.views.components
//
//import androidx.compose.animation.AnimatedVisibility
//import androidx.compose.animation.animateColorAsState
//import androidx.compose.animation.animateContentSize
//import androidx.compose.animation.core.animateFloatAsState
//import androidx.compose.animation.core.tween
//import androidx.compose.animation.fadeIn
//import androidx.compose.animation.fadeOut
//import androidx.compose.foundation.clickable
//import androidx.compose.foundation.layout.Arrangement
//import androidx.compose.foundation.layout.Box
//import androidx.compose.foundation.layout.Column
//import androidx.compose.foundation.layout.Row
//import androidx.compose.foundation.layout.Spacer
//import androidx.compose.foundation.layout.padding
//import androidx.compose.material3.Card
//import androidx.compose.material3.Icon
//import androidx.compose.material3.LocalTextStyle
//import androidx.compose.material3.MaterialTheme
//import androidx.compose.material3.Text
//import androidx.compose.runtime.Composable
//import androidx.compose.runtime.LaunchedEffect
//import androidx.compose.runtime.getValue
//import androidx.compose.runtime.mutableStateOf
//import androidx.compose.runtime.remember
//import androidx.compose.runtime.setValue
//import androidx.compose.ui.Alignment
//import androidx.compose.ui.Modifier
//import androidx.compose.ui.draw.drawWithContent
//import androidx.compose.ui.graphics.Color
//import androidx.compose.ui.graphics.graphicsLayer
//import androidx.compose.ui.graphics.vector.ImageVector
//import androidx.compose.ui.graphics.vector.rememberVectorPainter
//import androidx.compose.ui.text.TextStyle
//import androidx.compose.ui.text.font.FontF


    float: left;
  }
  .buddypress-wrap .standard-form #invite-list ul {
    list-style: none;
    margin: 1%;
  }
  .buddypress-wrap .standard-form #invite-list ul li {
    margin: 0 0 0 1%;
  }
  .buddypress-wrap .standard-form .main-column {
    margin-left: 190px;
  }
  .buddypress-wrap .standard-form .main-column ul#friend-list {
    clear: none;
    float: left;
  }
  .buddypress-wrap .standard-form .main-column ul#friend-list h4 {
    clear: none;
  }
}

.buddypress-wrap .standard-form .bp-tables-user label {
  margin: 0;
}

.buddypress-wrap .standard-form button.visibility-toggle-link {
  font-size: 12px;
  margin: 5px;
}

.buddypress-wrap .signup-form label,
.buddypress-wrap .signup-form legend {
  font-weight: 400;
}

body.no-js .buddypress #notifications-bulk-management #select-all-notifications,
body.no-js .buddypress label[for="message-type-select"],
body.no-js .buddypress #message-type-select,
body.no-js .buddypress #delete_inbox_messages,
body.no-js .buddypress #messages-bulk-management #select-all-messages {
  display: none;
}

/* Overrides for embedded WP editors */
.buddypress-wrap .wp-editor-wrap a.button,
.buddypress-wrap .wp-editor-wrap .wp-editor-wrap button,
.buddypress-wrap .wp-editor-wrap .wp-editor-wrap input[type="submit"],
.buddypress-wrap .wp-editor-wrap .wp-editor-wrap input[type="button"],
.buddypress-wrap .wp-editor-wrap input[type="reset"] {
  padding: 0 8px 1px;
}

.buddypress-wrap .select-wrap {
  border: 1px solid #eee;
}

.buddypress-wrap .select-wrap label {
  display: inline;
}

.buddypress-wrap .select-wrap select::-ms-expand {
  display: none;
}

.buddypress-wrap .select-wrap select {
  -moz-appearance: none;
  -webkit-appearance: none;
  -o-appearance: none;
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 5px 25px 5px 10px;
  position: relative;
  z-index: 1;
  width: 100%;
}

.buddypress-wrap .select-wrap select,
.buddypress-wrap .select-wrap select:focus,
.buddypress-wrap .select-wrap select:active {
  background: transparent;
}

.buddypress-wrap .select-wrap span.select-arrow {
  font-size: 10px;
  display: inline-block;
  position: absolute;
  right: 8px;
  top: 10px;
  z-index: 0;
}

.buddypress-wrap .select-wrap span.select-arrow:before {
  color: #ccc;
  content: "\25BC";
}

.buddypress-wrap .select-wrap:focus .select-arrow:before, .buddypress-wrap .select-wrap:hover .select-arrow:before {
  color: #a6a6a6;
}

.buddypress-wrap .subnav-filters .select-wrap {
  position: relative;
}

@media screen and (min-width: 32em) {
  .buddypress-wrap .subnav-filters .select-wrap {
    margin-ri


rawFrameEnabled = enabled;
  }

  /**
   * Sets the color for drawing edges.
   *
   * @param edgeColor a valid instance.
   */
  public void setEdgeColor(Color edgeColor) {
    this.edgeColor = edgeColor;
  }

  /**
   * Sets the rendering operation to draw edges.
   *
   * @param enabled true if edges are to be drawn; false if edges are not
   * rendered.
   */
  public void setEdgeRenderingEnabled(boolean enabled) {
    edgeRenderingEnabled = enabled;
  }

  /**
   * Sets the render operation to label edges.  By default, only the
   * baseline side for an edge is labeled. But the label selection
   * can be configured for two-sided labeling using the
   * setEdgeLabelDualSideConfiguration method.
   *
   * @param enabled true if edges are labeled; false if edge labels are not
   * rendered.
   */
  public void setEdgeLabelEnabled(boolean enabled) {
    edgeLabelEnabled = enabled;
  }

  /**
   * Sets the edge-rendering operation to label both sides of an edge.
   * By default, only the baseline side for an edge is labeled.
   * Single sided labeling is advantageous in cases where an image includes
   * a dense arrangement of edges and might become overly cluttered if edges
   * were labeled on both sides.
   * @param enabled true if both sides of an edge are to be labeled; false
   * if only the baseline-side of the edge (the even-numbered side) is labeled.
   */
  public void setEdgeLabelDualSideConfiguration(boolean enabled){
    edgeLabelDualSideConfiguration = enabled;
    if(enabled){
      edgeLabelEnabled = true;
    }
  }

  /**
   * Sets the render operation to draw vertices.
   *
   * @param enabled true if vertices are to be drawn; false if vertices are not
   * rendered.
   */
  public void setVertexRenderingEnabled(boolean enabled) {
    this.vertexRenderingEnabled = enabled;
  }

  /**
   * Sets the render operation to label vertices based on their integer index
   * value.
   *
   * @param enabled true if index-value rendering is enabled; otherwise false.
   */
  public void setVertexLabelEnabledToShowIndex(boolean enabled) {
    vertexLabelEnableIndex = enabled;
  }

  /**
   * Sets the render operation to label vertices based on their z value.
   *
   * @param enabled true if z-value rendering is enabled; otherwise false.
   */
  public void setVertexLabelEnabledToDisplayZ(boolean enabled) {
    vertexLabelEnableZ = enabled;

  }

  /**
   * Sets the format used when creating a label based on the numerical
   * value of the z coordinate for a vertex.
   *
   * @param format a valid Java format string.
   */
  public void setVertexLabelFormatZ(String format) {
    vertexLabelFormatZ = format;
  }

  private void drawEdgeLabel(Graphics2D g2d, AffineTransform af, IQuadEdge edge) {

    g2d.setStroke(thinStroke);
    g2d.setColor(edgeColor);
    double[] xy = new double[8];
    Vertex A = edge.getA();
    Vertex B = edge.getB();
    xy[0] = A.getX();
    xy[1] = A.getY();
    xy[2] = B.getX();
    xy[3] = B.getY();
    af.transform(xy, 0, xy, 4, 2);
    // compute the midpoint  and the perpendicular (px, py)
    // in pixel coordinates.  The perpendicular is to the left
    // of the


goto cleanup;
    }

    /* Register SAS window class */
    swc.cbSize = sizeof(WNDCLASSEXW);
    swc.style = CS_SAVEBITS;
    swc.lpfnWndProc = SASWindowProc;
    swc.cbClsExtra = 0;
    swc.cbWndExtra = 0;
    swc.hInstance = hAppInstance;
    swc.hIcon = NULL;
    swc.hCursor = NULL;
    swc.hbrBackground = NULL;
    swc.lpszMenuName = NULL;
    swc.lpszClassName = WINLOGON_SAS_CLASS;
    swc.hIconSm = NULL;
    if (RegisterClassExW(&swc) == 0)
    {
        ERR("WL: Failed to register SAS window class\n");
        goto cleanup;
    }

    /* Create invisible SAS window */
    Session->SASWindow = CreateWindowExW(
        0,
        WINLOGON_SAS_CLASS,
        WINLOGON_SAS_TITLE,
        WS_POPUP,
        0, 0, 0, 0, 0, 0,
        hAppInstance, Session);
    if (!Session->SASWindow)
    {
        ERR("WL: Failed to create SAS window\n");
        goto cleanup;
    }

    /* Register SAS window to receive SAS notifications */
    if (!SetLogonNotifyWindow(Session->SASWindow))
    {
        ERR("WL: Failed to register SAS window\n");
        goto cleanup;
    }

    if (!SetDefaultLanguage(NULL))
        return FALSE;

    ret = TRUE;

cleanup:
    if (!ret)
        UninitializeSAS(Session);
    return ret;
}


 void						release() = 0;

protected:
										PxCollection()	{}
	virtual								~PxCollection()	{}
};

#if !PX_DOXYGEN
} // namespace physx
#endif

/**
\brief Creates a collection object.

Objects can only be serialized or deserialized through a collection.
For serialization, users must add objects to the collection and serialize the collection as a whole.
For deserialization, the system gives back a collection of deserialized objects to users.

\return The new collection object.

\see PxCollection, PxCollection::release()
*/
PX_C_EXPORT PX_PHYSX_COMMON_API physx::PxCollection* PX_CALL_CONV PxCreateCollection();

#endif


;
			let desc = `${name}`;
			if (result[i].id === msg.author.id)
				desc = "🔴 " + desc;

			final.addField(title.trim(), desc.trim(), inline);
		}

		if (final.fields.length === 0)
			final.addField(`Último lugar - $0`, `obj_isaque, agora um fantasma\n👻`, inline);

		msg.channel.send(final).catch(discordErrorHandler);
	},
	aliases: ["richest", "burgueses", "rank"],
	syntaxes: ["[página]"],
	description: "Conheça os maiores burgueses do servidor.",
	help: "Manda uma lista com os 10 usuários mais ricos do servidor.",
	examples: ["", "2"],
	permissions: Permission.SHITPOST
}import { AuthChecker } from 'type-graphql';
import { verify } from 'jsonwebtoken';
import { getRepository } from 'typeorm';
import { Hero } from './entities/hero';

import { Context } from './interfaces/context.interface';
const JWT_SIGNING_SECRET = process.env.JWT_SIGNING_SECRET;

// create auth checker function
export const authChecker: AuthChecker<Context> = async ({ context: { token } }, roles) => {

    const heroRepository = getRepository(Hero);

    try {
        // verify the JWT
        let verification = verify(token, JWT_SIGNING_SECRET) as { userId: string };

        // find the hero with corresponding ID
        const hero = await heroRepository.findOne(verification.userId);

        // return true if hero's role has access, false if not
        return roles.includes(hero.role);
    } catch {
        // if verification fails
        return false;
    }

};import { ThunkAction } from 'redux-thunk';

import generateReport, { checkAvailability, shouldCheckAvailability } from '../../services/report';
import {
  Message,
  MessageType,
  ReportActions,
  ReportActionTypes,
  ReportConfig,
} from '../reportTypes';
import { RootState } from '../rootState';

export const requestMessage = (message: Message): ReportActionTypes => ({
  type: ReportActions.REQUEST_MESSAGE,
  message,
});

export const failure = (error: Error): ReportActionTypes => ({
  type: ReportActions.FAILURE,
  error,
});

export const toggleLoading = (isLoading: boolean): ReportActionTypes => ({
  type: ReportActions.TOGGLE_LOADING,
  isLoading,
});

export const reInitializeState = (): ReportActionTypes => ({
  type: ReportActions.RE_INITIALIZE_STATE,
});

export const clearMessage = (): ReportActionTypes => ({
  type: ReportActions.CLEAR_MESSAGE,
});

export const fetchReport = (
  payload: ReportConfig,
): ThunkAction<void, RootState, null, ReportActionTypes> => async (dispatch) => {
  dispatch(toggleLoading(true));
  try {
    dispatch(
      requestMessage({
        content: 'Please wait while we generate your report',
        duration: 0,
        type: MessageType.LOADING,
      }),
    );
    const { sqon, name } = payload;
    await generateReport({
      sqon,
      name,
    });
    dispatch(clearMessage());
  } catch (error) {
    dispatch(clearMessage());
    dispatch(failure(error));
  } finally {
    dispatch(toggleLoading(false));
  }
};

export const fetchReportIfNeeded = (
  payload: ReportConfig,
): ThunkAction<Promise<void>, RootState, null, ReportActionTypes> => async (dispatch) => {
  const { sqon, name } = payload;

  let shouldFetch = true;
  dispatch(toggleLoading(true));
  if (shouldCheckAvailability(name)) {
    dispatch(
      requestMessage({
        content: 'Checking for ava


 $header-height__mobile;
		}
	}

	.brand {
		margin-right: $header-nav--padding-h;
	}
}

.site-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
	height: $header-height__mobile;
}

.header-nav {
	flex-grow: 1;

	.header-nav-inner {
		display: flex;
		flex-grow: 1;
	}

    ul {
        display: flex;
        align-items: center;
		flex-grow: 1;
        white-space: nowrap;
		margin-bottom: 0;

		&:first-of-type {
			flex-wrap: wrap;
		}
    }

    li {

		+ .header-button {
			margin-left: $header-nav--padding-h;
		}
    }

    a:not(.button) {
		display: block;
        @include anchor-aspect(header);
		@include font-weight(header-link);
		text-transform: $link-header--transform;
        padding: 0 $header-nav--padding-h;

		.invert-color & {
			@include anchor-aspect(header, inverse);
		}
    }

	a.button {
		margin-left: $header-nav--padding-h;
	}
}

.header-nav-center:first-of-type {
	flex-grow: 1;
	justify-content: flex-end;
}

.header-nav-right {
	justify-content: flex-end;

	+ .header-nav-right {
		flex-grow: 0;
	}
}

.header-nav-toggle {
	display: none;
}

@include media( '<=medium' ) {

	.header-nav-toggle {
		display: block;

		// Header navigation when the hamburger is a previous sibling
		+ .header-nav {
			flex-direction: column;
			position: absolute;
			left: 0;
			right: 0;
			top: 100%;
			z-index: 9999;
			background: color-bg(menu-mobile);
			max-height: 0;
	        opacity: 0;
	        overflow: hidden;
	        transition: max-height .25s ease-in-out, opacity .15s;

			&.is-active {
				opacity: 1;
			}

			.header-nav-inner {
				flex-direction: column;
				padding: $header-nav--padding-v__mobile;
			}

			ul {
				display: block;
				text-align: center;

			    a:not(.button) {
					display: inline-flex;
			        @include anchor-aspect(header-mobile);
					padding-top: $header-nav--padding-v__mobile / 2;
					padding-bottom: $header-nav--padding-v__mobile / 2;
			    }
			}

			a.button {
				margin-left: 0;
				margin-top: $header-nav--padding-v__mobile / 2;
				margin-bottom: $header-nav--padding-v__mobile / 2;
			}
		}
	}
}

@include media( '>medium' ) {

	.site-header {

		+ .site-content {

			.section:first-of-type {
				padding-top: $header-height__desktop;
			}
		}
	}

	.site-header-inner {
		height: $header-height__desktop;
	}
}
.site-footer {
	position: relative;

	&::before {
		content: '';
		position: absolute;
		bottom: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background: color-bg(footer);
		z-index: -3;
	}
}

.site-footer-inner {
	padding: $footer--padding__mobile 0;
}

.footer-top {
	paddi


.position="absolute",j(t.style,{margin:0,padding:0})),window.addEventListener("resize",n,!1),n(),{canvas:i,onDestroy:function(){window.removeEventListener("resize",n),t.removeChild(i)}}}(i||document.body,0,u)))return null;a=e.canvas,p=e.onDestroy}o=function(t,e){function r(r){try{return t.getContext(r,e)}catch(t){return null}}return r("webgl")||r("experimental-webgl")||r("webgl-experimental")}(a,t)}return o?{gl:o,canvas:a,container:i,extensions:l,optionalExtensions:c,pixelRatio:u,profile:f,onDone:h,onDestroy:p}:(p(),h("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function a(t,e){for(var r=Array(t),n=0;n<t;++n)r[n]=e(n);return r}function o(t){var e,r;return e=(65535<t)<<4,e|=r=(255<(t>>>=e))<<3,(e|=r=(15<(t>>>=r))<<2)|(r=(3<(t>>>=r))<<1)|t>>>r>>1}function s(){function t(t){t:{for(var e=16;268435456>=e;e*=16)if(t<=e){t=e;break t}t=0}return 0<(e=r[o(t)>>2]).length?e.pop():new ArrayBuffer(t)}function e(t){r[o(t.byteLength)>>2].push(t)}var r=a(8,function(){return[]});return{alloc:t,free:e,allocType:function(e,r){var n=null;switch(e){case 5120:n=new Int8Array(t(r),0,r);break;case 5121:n=new Uint8Array(t(r),0,r);break;case 5122:n=new Int16Array(t(2*r),0,r);break;case 5123:n=new Uint16Array(t(2*r),0,r);break;case 5124:n=new Int32Array(t(4*r),0,r);break;case 5125:n=new Uint32Array(t(4*r),0,r);break;case 5126:n=new Float32Array(t(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n},freeType:function(t){e(t.buffer)}}}function l(t){return!!t&&"object"==typeof t&&Array.isArray(t.shape)&&Array.isArray(t.stride)&&"number"==typeof t.offset&&t.shape.length===t.stride.length&&(Array.isArray(t.data)||W(t.data))}function c(t,e,r,n,i,a){for(var o=0;o<e;++o)for(var s=t[o],l=0;l<r;++l)for(var c=s[l],u=0;u<n;++u)i[a++]=c[u]}function u(t){return 0|$[Object.prototype.toString.call(t)]}function f(t,e){for(var r=0;r<e.length;++r)t[r]=e[r]}function h(t,e,r,n,i,a,o){for(var s=0,l=0;l<r;++l)for(var c=0;c<n;++c)t[s++]=e[i*l+a*c+o]}function p(t,e,r,n){function i(e){this.id=c++,this.buffer=t


@param isInstalled true to simulate that app is installed
   * @param hasValidSignature true to give the app a valid signature
   */
  private fun setupPackageManagerForApp(isInstalled: Boolean, hasValidSignature: Boolean) {
    if (isInstalled) {
      val packageInfo = PackageInfo()
      whenever(mockPackageManager.getPackageInfo(PACKAGE_NAME, PackageManager.GET_SIGNATURES))
          .thenReturn(packageInfo)
      val signature = mock(Signature::class.java)
      whenever(signature.toByteArray()).thenReturn(byteArrayOf())
      packageInfo.signatures = arrayOf(signature)

      if (hasValidSignature) {
        whenever(Utility.sha1hash(signature.toByteArray())).thenReturn(APP_HASH)
      }
    } else {
      whenever(mockPackageManager.getPackageInfo(PACKAGE_NAME, PackageManager.GET_SIGNATURES))
          .thenThrow(PackageManager.NameNotFoundException())
    }
  }
}
/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 * All rights reserved.
 *
 * This source code is licensed under the license found in the
 * LICENSE file in the root directory of this source tree.
 */

package com.facebook.internal

import com.facebook.FacebookPowerMockTestCase
import java.util.EnumSet
import org.assertj.core.api.Assertions.assertThat
import org.json.JSONArray
import org.json.JSONObject
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Test

class FetchedAppSettingsManagerTest : FacebookPowerMockTestCase() {
    private val validJson =
        "{\n" +
                "  \"supports_implicit_sdk_logging\": true,\n" +
                "  \"suggested_events_setting\": \"{}\",\n" +
                "  \"aam_rules\": \"{}\",\n" +
                "  \"app_events_feature_bitmask\": 65541,\n" +
                "  \"app_events_session_timeout\": 60,\n" +
                "  \"seamless_login\": 1,\n" +
                "  \"smart_login_bookmark_icon_url\": \"swag\",\n" +
                "  \"smart_login_menu_icon_url\": \"yolo\",\n" +
                "  \"android_dialog_configs\": \"garbage\",\n" +
                "  \"protected_mode_rules\": {\"blocklist_events\": [\"test_event_for_block_list_1\", \"test_event_for_block_list_2\"], \n" +
                "  \"redacted_events\": [{\"key\":\"FilteredEvent\", \"value\":[\"abc\", \"def\"]}, {\"key\":\"RedactedEvent\", \"value\":[\"opq\", \"xyz\"]}],\n" +
                "  \"sensitive_params\": [{\"key\":\"test_event_1\", \"value\":[\"last name\", \"first name\"]}, {\"key\":\"test_event_2\", \"value\":[\"address\", \"ssn\"]}]},\n" +
                "  \"auto_log_app_events_default\": true,\n" +
                "  \"auto_log_app_events_enabled\": true,\n" +
                "  \"app_events_config\":{\"default_ate_status\":2,\"advertiser_id_collection_enabled\":true,\"event_collection_enabled\":true,\"iap_manual_and_auto_log_dedup_keys\":[{\"key\":\"prod_keys\",\"value\":[{\"key\":\"fb_iap_product_id\",\"value\":[{\"key\":0,\"value\":\"fb_content_id\"},{\"key\":1,\"value\":\"fb_product_item_id\"},{\"key\":2,\"value\":\"fb_iap_product_id\"}]},{\"key\":\"fb_iap_product_title\",\"value\":[{\"key\":0,\"value\":\"fb_content_title\"},{\"key\":1,\"value\":\"fb_product_title\"},{\"key\":2,\"value\":\"fb_iap_product_title\"}]},{\"key\":\"fb_iap_product_description\",\"value\":[{\"key\":0,\"value\":\"fb_description\"},{\"key\":1,\"value\":\"


"]={
   ["cs"]="atrightmargin",
   ["de"]="atrightmargin",
   ["en"]="atrightmargin",
   ["fr"]="enmargedroite",
   ["it"]="atrightmargin",
   ["nl"]="oprechtermarge",
   ["pe"]="درحاشیه‌راست",
   ["ro"]="atrightmargin",
  },
  ["attachment"]={
   ["en"]="attachment",
   ["fr"]="piecejointe",
   ["nl"]="aanhangsel",
  },
  ["august"]={
   ["cs"]="srpen",
   ["de"]="august",
   ["en"]="august",
   ["fr"]="aout",
   ["it"]="agosto",
   ["nl"]="augustus",
   ["pe"]="آگوست",
   ["ro"]="august",
  },
  ["author"]={
   ["cs"]="autor",
   ["de"]="autor",
   ["en"]="author",
   ["fr"]="auteur",
   ["it"]="autore",
   ["nl"]="auteur",
   ["ro"]="autor",
  },
  ["auto"]={
   ["cs"]="auto",
   ["de"]="auto",
   ["en"]="auto",
   ["fr"]="auto",
   ["it"]="auto",
   ["nl"]="auto",
   ["pe"]="خودکار",
   ["ro"]="auto",
  },
  ["autointro"]={
   ["cs"]="autouvod",
   ["de"]="autointro",
   ["en"]="autointro",
   ["fr"]="autointro",
   ["it"]="autointro",
   ["nl"]="autointro",
   ["pe"]="پیشگفتارخودکار",
   ["ro"]="autointro",
  },
  ["back"]={
   ["cs"]="zpet",
   ["de"]="zurueck",
   ["en"]="back",
   ["fr"]="retour",
   ["it"]="dietro",
   ["nl"]="terug",
   ["pe"]="پشت",
   ["ro"]="inapot",
  },
  ["background"]={
   ["cs"]="pozadi",
   ["de"]="hintergrund",
   ["en"]="background",
   ["fr"]="arriereplan",
   ["it"]="sfondo",
   ["nl"]="achtergrond",
   ["pe"]="پس‌زمینه",
   ["ro"]="fundal",
  },
  ["backmatter"]={
   ["cs"]="epilogy",
   ["de"]="epiloge",
   ["en"]="backmatter",
   ["fr"]="pagesdefin",
   ["it"]="postambolo",
   ["nl"]="uitleidingen",
   ["pe"]="پس‌مطلب",
   ["ro"]="epilogul",
  },
  ["backpart"]={
   ["cs"]="epilog",
   ["de"]="epilog",
   ["en"]="backpart",
   ["fr"]="postface",
   ["it"]="postfazione",
   ["nl"]="uitleiding",
   ["pe"]="پس‌قسمت",
   ["ro"]="epilog",
  },
  ["backspace"]={
   ["cs"]="zpetnamezera",
   ["de"]="rumpfspatium",
   ["en"]="backspace",
   ["fr"]="retourarrière",
   ["it"]="backspace",
   ["nl"]="rugwit",
   ["pe"]="فضای‌پشت",
   ["ro"]="spatiuspate",
  },
  ["backward"]={
   ["cs"]="zpet",
   ["de"]="rueckwaerts",
   ["en"]="backward",
   ["fr"]="enarriere",
   ["it"]="indietro",
   ["nl"]="ach


('utf-8').replace(/\0/g, '');
	} catch {
		return undefined;
	}
}

const undervoltageRegex = /under.*voltage/;
export async function undervoltageDetected(): Promise<boolean> {
	try {
		const { stdout: dmesgStdout } = await exec('dmesg');
		return undervoltageRegex.test(dmesgStdout.toString());
	} catch {
		return false;
	}
}

export async function getSysInfoToReport() {
	const [cpu, mem, temp, cpuid, storage, undervoltage] = await Promise.all([
		getCpuUsage(),
		getMemoryInformation(),
		getCpuTemp(),
		getCpuId(),
		getStorageInfo(),
		undervoltageDetected(),
	]);

	return {
		cpu_usage: cpu,
		memory_usage: mem.used,
		memory_total: mem.total,
		storage_usage: storage.storageUsed,
		storage_total: storage.storageTotal,
		storage_block_device: storage.blockDevice,
		cpu_temp: temp,
		cpu_id: cpuid,
		is_undervolted: undervoltage,
	};
}

export type SystemInfo = UnwrappedPromise<
	ReturnType<typeof getSysInfoToReport>
>;

const significantChange: { [key in keyof SystemInfo]?: number } = {
	cpu_usage: 20,
	cpu_temp: 5,
	memory_usage: 10,
};

export function filterNonSignificantChanges(
	past: Partial<SystemInfo>,
	current: SystemInfo,
): Array<keyof SystemInfo> {
	return Object.keys(
		_.omitBy(current, (value, key: keyof SystemInfo) => {
			// If we didn't have a value for this in the past, include it
			if (past[key] == null) {
				return true;
			}
			const bucketSize = significantChange[key];
			// If we don't have any requirements on this value, include it
			if (bucketSize == null) {
				return true;
			}

			return (
				Math.floor((value as number) / bucketSize) !==
				Math.floor((past[key] as number) / bucketSize)
			);
		}),
	) as Array<keyof SystemInfo>;
}

function bytesToMb(bytes: number) {
	return Math.floor(bytes / 1024 / 1024);
}
import { MAX_LIFE } from "../mechanics/constants";

type Params = {
  oppCells: Set<Cell>;
  myCells: Set<Cell>;
  oppLife: number;
  myLife: number;
};

export function decideActions(
  actionErrors: { action: Action; errors: Errors }[],
  params: Params
) {
  const actionTotalErrors = actionErrors
    .map(({ action, errors }) => ({
      action,
      totalError: getTotalError(errors, params)
    }))
    .sort((a, b) => a.totalError - b.totalError);
  console.error(actionTotalErrors);

  const firstActionError = actionTotalErrors.shift();
  if (!firstActionError) throw new Error("No available actions");

  // TODO Allow SILENCE and move
  const actions: Action[] = [firstActionError.action];
  if (actionTotalErrors.length > 1) {
    const secondActionTotalError = actionTotalErrors.find(
      ({ action, totalError }) => {
        if (firstActionError.action.type === "SILENCE") {
          action.type !== firstActionError.action.type &&
            totalError < 0 &&
            action.type !== "MOVE";
        } else if (firstActionError.action.type === "MOVE") {
          action.type !== firstActionError.action.type &&
            totalError < 0 &&
            action.type !== "SILENCE";
        } else {
          return action.type !== firstActionErro


gs, evt_obj):
	evt_obj.return_val = args.get_arg(1)
	return 0

def DMMAdd(attachee, args, evt_obj):
	args.set_arg(0, 0)
	args.set_arg(1, 0)
	args.set_arg(2, 1) #Min Heighten levels is 1
	return 0

def DMMClearCost(attachee, args, evt_obj):
	args.set_arg(1, 0)
	return 0

#Used to create each DMM feat
def DMMAddFeat(FeatName, Type):
	modifier = PythonModifier(FeatName, 4) #Enable Flag, Cost, Heighten Value (Heighten MM ONly), Spare
	modifier.MapToFeat(FeatName)
	modifier.AddHook(ET_OnBuildRadialMenuEntry, EK_NONE, DMMRadial, (Type,))
	modifier.AddHook(ET_OnMetaMagicMod, EK_NONE, DMMMetamagicUpdate, (Type,))
	modifier.AddHook(ET_OnD20PythonSignal, "Sudden Metamagic Deduct Charge", DMMDeduct, (Type,))
	modifier.AddHook(ET_OnD20PythonQuery, "Divine Metamagic Cost", DMMCostQuery, (Type,))
	modifier.AddHook(ET_OnConditionAdd, EK_NONE, DMMAdd, (Type,))
	modifier.AddHook(ET_OnBeginRound, EK_NONE, DMMClearCost, ())
	modifier.AddHook(ET_OnD20Signal, EK_S_Spell_Cast, DMMClearCost, ())
	return modifier

dmmEmpowerModifier = DMMAddFeat("Divine Metamagic - Empower", DMMEmpower)
dmmMaximizeModifier = DMMAddFeat("Divine Metamagic - Maximize", DMMMaximize)
dmmHeightenModifier = DMMAddFeat("Divine Metamagic - Heighten", DMMHeighten)
dmmEnlargeModifier = DMMAddFeat("Divine Metamagic - Enlarge", DMMEnlarge)
dmmExtendModifier = DMMAddFeat("Divine Metamagic - Extend", DMMExtend)
dmmQuickenModifier = DMMAddFeat("Divine Metamagic - Quicken", DMMQuicken)
dmmWidenModifier = DMMAddFeat("Divine Metamagic - Widen", DMMWiden)
dmmStillModifier = DMMAddFeat("Divine Metamagic - Still", DMMStill)
dmmSilentModifier = DMMAddFeat("Divine Metamagic - Silent", DMMSilent)


shields.io/github/stars/JassinAlSafe/NothingCN?style=social)](https://github.com/JassinAlSafe/NothingCN/stargazers)

---

An open source creative component library built with Next.js 15, React 19, TypeScript, and Tailwind CSS. NothingCN provides a comprehensive set of unique, visually stunning UI components with live previews and copy-paste code examples for developers.

**Inspired by the minimalist design philosophy of [NOTHING](https://nothing.tech/)** - bringing that same "nothing" aesthetic to the web with clean, purposeful components.

## ✨ Features

- 🎨 **Creative Design** - Unique, visually stunning components that stand out
- 🌙 **Dark Mode** - Full dark mode support with smooth transitions
- ♿ **Accessible** - Built with accessibility in mind using Radix UI primitives
- 📱 **Responsive** - Works perfectly on all device sizes
- 🔧 **Customizable** - Easy to customize with CSS variables and class variants
- 📋 **Copy & Paste** - No installation required, just copy the code
- 🔍 **Live Previews** - See components in action with interactive examples
- 🎯 **TypeScript** - Full TypeScript support with proper type definitions

## 🚀 Tech Stack

- **Framework**: Next.js 15 with App Router
- **React**: React 19
- **Styling**: Tailwind CSS 4
- **UI Primitives**: Radix UI
- **Icons**: Lucide React
- **Code Highlighting**: Prism React Renderer
- **Variant Management**: Class Variance Authority
- **Utilities**: clsx, tailwind-merge

## 🌟 What Makes NothingCN Special

- **Open Source**: Completely free and open for everyone to use
- **Creative Focus**: Emphasis on unique, creative component designs
- **Copy-Paste Ready**: No installation required - just copy and use
- **Community Driven**: Built by developers, for developers
- **Modern Stack**: Latest web technologies for optimal performance

## 📦 Components

### Basic Components

- **Button** - Multiple variants and sizes
- **Card** - Flexible card component with header, content, and footer
- **Badge** - Status indicators and labels
- **Tabs** - Tabbed interface for organizing content

### Advanced Components

- **Code Block** - Syntax-highlighted code with copy functionality
- **Theme System** - Comprehensive theming with CSS variables

### Blocks (Component Combinations)

- **Stats Cards** - Dashboard-style metric cards
- **User Cards** - Profile cards with contact information
- **Social Media Posts** - Social media style layouts
- **Event Cards** - Event information display

## 🛠 Getting Started

### Prerequisites

- Node.js 18+
- npm or yarn

### Installation

1. Clone the repository:

```bash
git clone https://github.com/nothingcn/nothingcn.git
cd nothingcn
```

2. Install dependencies:

```bash
npm install
# or
pnpm install
```

3. Run the development server:

```bash
npm run dev
# or
pnpm dev
```

4. Open [http://localhost:3000](http://localhost:3000) in your browser.

## 📖 Usage

### Using Components

1. Navigate to the Components page to see all available components
2. Click on any component to see its live preview
3. Switch to the "Code" tab to see the implementation
4. Copy the code and paste it into your project

### Example Usage

```tsx
import { Button } from "@/components/ui/button";
import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@/components/ui/card";

export function MyComponent() {
  return (
    <Card className="w-[350px]">
      <CardHeader>
        <CardTitle>My Component</CardTitle>
        <CardDescripti


child(even),
ul#account-list li:nth-child(even),
div.followers-row:nth-child(even) {
	background-color: #EEEEFF;
	border-top-color: #666699;
	background-image: url('../images/entry-even-bg.png');
	background-repeat: repeat-x;
}

/*************************************************
Timeline entries are... entries in the timelines
*/
div.timeline-entry {
	position: relative;
	clear: both;
	overflow: hidden;
	border-top-width: medium;
	border-top-style: solid;
	border-top-color: #999966;
	padding: 8px 5px;

}
div.timeline-entry:hover {
	opacity: 1;
}
div.timeline-entry.reply {/* Replies/mentions */
	background:-webkit-gradient(
		linear, left top, left bottom, from(#fdf7c6), to(#fcec8f));
	outline: 0;
}
div.timeline-entry.dm {/* Direct messages */
	background:-webkit-gradient(
		linear, left top, left bottom, from(#ffcbcb), to(#ffb3b2));
	outline: 0;
}
div.timeline-entry.retweet .status-text {
	background: transparent url(../images/retweeted.png) 0 0 no-repeat;
	text-indent: 24px;
}
div.timeline-entry.retweet .status-text * {
	text-indent: 0;
}
/*
Entries that have been "read" (selected and then deselected)
*/
div.timeline-entry.read {
}
div.timeline-entry.read:not(.ui-selected) {
	max-height: 25px;
	padding-top: 5px;
	padding-bottom: 5px;
}
div.timeline-entry.read:hover {
	opacity: 1;
}
div.timeline-entry.read .status-text {
	color: #999;
}
div.timeline-entry.read.reply .status-text {
	color: #ccbc5f;
}
div.timeline-entry.read.dm .status-text {
	color: #cf9392;
}
div.timeline-entry.read.ui-selected .status-text {
	color: #f0f0f0;
}
div.timeline-entry.read:not(.ui-selected) div.user {
	padding: 0;
	overflow: hidden;
	opacity: 0.75;
	white-space: nowrap;
	transition: opacity 0.125s linear;
	-webkit-transition: opacity 0.125s linear;
}
div.timeline-entry.read:not(.ui-selected):hover div.user {
	opacity: 1;
}
div.timeline-entry.read:not(.ui-selected) div.user div.user-image {
	width: 24px;
	height: 24px;
	margin: 0 auto;
	background-size: 24px 24px;
	-webkit-background-size: 24px 24px;
	border:none;
}
div.timeline-entry.read:not(.ui-selected) div.user div.user-screen-name {
	display: none;
}
div.timeline-entry.read:not(.ui-selected) div.status {
	padding: 0;
}
div.timeline-entry.read:not(.ui-selected) .status-text {
	margin-top: 5px; /* Show only status text */
	margin-bottom:99px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
div.timeline-entry.read:not(.ui-selected):hover .status-text {
	color: #000;
}

/*
Selected entries
The .ui-selected class name comes from the one used by the jQuery.ui
selectables plugin. We don't actually use that here, but it was
experimented with, and may return


但必须确保我们的公司的主要人员仍然是技术人员。“
>
> “我们会将产品团队主要聚焦在工程方面，其他领域的一些人员会被解雇，并且避免产品团队被来自其他团队的大量交互请求所淹没。”

总之，扎克伯格明白说了，Meta 接下来要做三件事——砍掉低优先级项目、减少管理层级、缩小团队——都会产生多余人员，所以需要进一步裁员。

我估计，其他互联网公司也会跟进，同样去做这三件事，所以行业裁员大概还会持续一段时间，就业形势可能要到今年下半年才会有所好转。

## 科技动态

1、[柯伊伯计划](https://www.theverge.com/2023/3/14/23639450/amazon-project-kuiper-satellite-dish-internet)

马斯克的 Starlink 项目终于迎来了竞争对手，亚马逊公司的柯伊伯计划（Project Kuiper）宣布即将正式运作。

![](https://cdn.beekka.com/blogimg/asset/202303/bg2023031803.jpeg)

今年5月份，亚马逊将会发射两颗原型卫星，然后明年上半年发生第一批正式卫星，下半年开始商业运作，提供卫星上网服务。

虽然，卫星还没有发射，但是信号接收终端已经亮相了，一共有三种，看上去都比 Starlink 的终端更简单易用。

![](https://cdn.beekka.com/blogimg/asset/202303/bg2023031804.webp)

最小的一个型号不到 7 x 7 厘米，非常便携。亚马逊声称它可以提供 100MBps 的带宽，如果属实，将可以彻底解决野外上网难题。

2、[灭火毯](https://www.thedrive.com/news/could-a-giant-fireproof-blanket-be-the-solution-for-stubborn-ev-battery-fires)

电动汽车着火是一个让人担心的安全问题，虽然概率很低，但终究是一个重大风险。更糟糕的是，某些电池着火，不能用水去浇，会越烧越旺。

![](https://cdn.beekka.com/blogimg/asset/202209/bg2022090502.webp)

为了让车主放心，LG 公司发明了一种汽车灭火毯，采用阻燃材料制造，能够耐很高的温度。

![](https://cdn.beekka.com/blogimg/asset/202209/bg2022090501.webp)

灭火毯平时放在后备箱，一旦出现电池着火，只要把它展开盖在车上，就能完全隔绝氧气，从而让火苗快速熄灭。

![](https://cdn.beekka.com/blogimg/asset/20220


# -*- coding: utf-8 -*-

# @Time    : 2025-5-17 12:30:06
# @Author  : NEO
# @FileName: example.py
# @Software: VSCode
# @Email   : it666@linux.do
# @Github  : https://github.com/BNTang
# @Description: 30-Python-循环-for循环-和else连用

# 1. 使用 for 循环遍历列表
# for x in xxx:
# 条件满足时的执行代码
# else:
# 与else连用
# 语法
# 注意
# 条件不满足时执行的语句
# 如果for派环可以顺利的执行完毕，则会执行else反之，使用了break则不会

name = ['NEO', 'BNTang', 'Python']

for x in name:
    print(x)
    break
else:
    print("循环结束")


oneNeighbors, getZoneNeighbors, c, DGGRS, \
      int, c & _ARG, , /*6Fj*/DGGRSZone zone _ARG /*6Fj*/DGGRSZone * neighbors _ARG /*6Fj*/int * nbType); \
   VIRTUAL_METHOD_PROTO(getZoneParents, getZoneParents, c, DGGRS, \
      int, c & _ARG, , /*6Fj*/DGGRSZone zone _ARG /*6Fj*/DGGRSZone * parents); \
   VIRTUAL_METHOD_PROTO(getZoneRefinedCRSVertices, getZoneRefinedCRSVertices, c, DGGRS, \
      TArray<Pointd _ARG int _ARG Pointd>, c & _ARG, , /*6Fj*/DGGRSZone zone _ARG /*6Fj*/CRS_ crs _ARG /*6Fj*/int edgeRefinement); \
   VIRTUAL_METHOD_PROTO(getZoneRefinedWGS84Vertices, getZoneRefinedWGS84Vertices, c, DGGRS, \
      TArray<GeoPoint _ARG int _ARG GeoPoint>, c & _ARG, , /*6Fj*/DGGRSZone zone _ARG /*6Fj*/int edgeRefinement); \
   VIRTUAL_METHOD_PROTO(getZoneTextID, getZoneTextID, c, DGGRS, \
      void, c & _ARG, , /*6Fj*/DGGRSZone zone _ARG /*6Fj*/C(String) zoneID); \
   VIRTUAL_METHOD_PROTO(getZoneWGS84Centroid, getZoneWGS84Centroid, c, DGGRS, \
      void, c & _ARG, , /*6Fj*/DGGRSZone zone _ARG /*6Fj*/GeoPoint & centroid); \
   VIRTUAL_METHOD_PROTO(getZoneWGS84Extent, getZoneWGS84Extent, c, DGGRS, \
      void, c & _ARG, , /*6Fj*/DGGRSZone zone _ARG /*6Fj*/GeoExtent & extent); \
   VIRTUAL_METHOD_PROTO(getZoneWGS84ExtentApproximate, getZoneWGS84ExtentApproximate, c, DGGRS, \
      void, c & _ARG, , /*6Fj*/DGGRSZone zone _ARG /*6Fj*/GeoExtent & extent); \
   VIRTUAL_METHOD_PROTO(getZoneWGS84Vertices, getZoneWGS84Vertices, c, DGGRS, \
      int, c & _ARG, , /*6Fj*/DGGRSZone zone _ARG /*6Fj*/GeoPoint * vertices); \
   VIRTUAL_METHOD_PROTO(isZoneCentroidChild, isZoneCentroidChild, c, DGGRS, \
      bool, c & _ARG, , /*6Fj*/DGGRSZone zone); \
   VIRTUAL_METHOD_PROTO(listZones, listZones, c, DGGRS, \
      TArray<C(DGGRSZone) _ARG int _ARG C(DGGRSZone)>, c & _ARG, , /*6Fj*/int level _ARG /*6Fj*/const GeoExtent & bbox); \
   VIRTUAL_METHOD_PROTO(zoneHasSubZone, zoneHasSubZone, c, DGGRS, \
      bool, c & _ARG, , /*6Fj*/DGGRSZone hayStack _ARG /*6Fj*/DGGRSZone needle);

#define DGGRS_VIRTUAL_METHODS(c) \
VIRTUAL_METHOD(compactZones, compactZones, c, DGGRS, \
   void, c & _ARG, , /*6Fj*/TArray<C(DGGRSZone) _ARG int _ARG C(DGGRSZone)> & zones, \
   DGGRS_compactZones(self ? self->impl : (C(DGGRS))null, /*7Al*/((Instance&)zones).impl);); \
VIRTUAL_METHOD(countSubZones, countSubZones, c, DGGRS, \
   uint64, c & _ARG, , /*6Fj*/DGGRSZone zone _ARG /*6Fj*/int depth, \


s_eth_signature_valid
- https://docs.starknet.io/build/corelib/core-starknet-eth_signature-verify_eth_signature
- https://docs.starknet.io/build/corelib/core-starknet-secp256_trait-Signature

---

## ECDSA and Signature Verification

### core::starknet::secp256_trait::Signature

Represents a Secp2561 ECDSA signature holding components `r`, `s`, and `y_parity`.

```rust
#[derive(Copy, Drop, Debug, PartialEq, Serde, Hash)]
pub struct Signature {
    pub r: u256,
    pub s: u256,
    pub y_parity: bool,
}
```

The `y_parity` boolean indicates the parity of the y coordinate of the elliptic curve point whose x coordinate is `r`. `true` means the y coordinate is odd.

### ECDSA Verification Functions

#### core::ecdsa::check_ecdsa_signature

Verifies an ECDSA signature against a message hash and public key. This implementation slightly deviates from the standard ECDSA, requiring corresponding modifications to the signature algorithm used.

This function validates that `s` and `r` are not 0 or equal to the curve order.

#### core::ecdsa::recover_public_key

Recovers the signer’s public key from an ECDSA signature, message hash, and the y-coordinate parity of point R.

**Signature**

```rust
pub fn recover_public_key(
    message_hash: felt252, signature_r: felt252, signature_s: felt252, y_parity: bool,
) -> Option
```

**Arguments**

- `message_hash`: The hash of the signed message.
- `signature_r`: The r component of the ECDSA signature (x-coordinate of point R).
- `signature_s`: The s component of the ECDSA signature.
- `y_parity`: The parity of the y-coordinate of point R (`true` for odd, `false` for even).

**Returns**

Returns `Some(public_key)` containing the x-coordinate of the recovered public key point if the signature is valid, `None` otherwise.

**Example**

```rust
use core::ecdsa::recover_public_key;

let message_hash = 0x503f4bea29baee10b22a7f10bdc82dda071c977c1f25b8f3973d34e6b03b2c;
let signature_r = 0xbe96d72eb4f94078192c2e84d5230cde2a70f4b45c8797e2c907acff5060bb;
let signature_s = 0x677ae6bba6daf00d2631fab14c8acf24be6579f9d9e98f67aa7f2770e57a1f5;
assert!(
    recover_public_key(:message_hash, :signature_r, :signature_s, y_parity: false)
        .unwrap() == 0x7b7454acbe7845da996377f85eb0892044d75ae95d04d3325a391951f35d2ec,
)
```

### Ethereum Signature Functions

These functions validate Ethereum signatures against a message hash and an expected Ethereum address. They enforce that `r` and `s` components are in the range `[1, N)`, where N is the size of the curve.

#### core::starknet::eth_signature::verify_eth_signature

Asserts that an Ethereum signature is valid.

**Signature**

```rust
pub fn verify_eth_signature(msg_hash: u256, signature: Signature, eth_address: EthAddress)
```

**Panics**

Panics if:

- The signature components are out of range (not in `[1, N)` where N is the curve order).
- The recovered address doesn’t match the provided address.

**Example**


GuildIcon)
	{
		_GuildIcon = (uint32)(nGuildIcon&0xffffffff);	// 32 bits en pos 0
	}
	else
	{
		sint8 nGuildBack =		(sint8)(nGuildIcon&15);			// 4 bits en pos 0
		sint8 nGuildSymbol =	(sint8)((nGuildIcon>>4)&63);	// 6 bits en pos 4
		sint8 nGuildInvert =	(sint8)((nGuildIcon>>10)&1);	// 1 bit  en pos 10
		uint8 nGuildColBackR =	(uint8)((nGuildIcon>>11)&255);	// 8 bits en pos 11
		uint8 nGuildColBackG =	(uint8)((nGuildIcon>>19)&255);	// 8 bits en pos 19
		uint8 nGuildColBackB =	(uint8)((nGuildIcon>>27)&255);	// 8 bits en pos 27
		uint8 nGuildColSymbR =	(uint8)((nGuildIcon>>35)&255);	// 8 bits en pos 35
		uint8 nGuildColSymbG =	(uint8)((nGuildIcon>>43)&255);	// 8 bits en pos 43
		uint8 nGuildColSymbB =	(uint8)((nGuildIcon>>51)&255);	// 8 bits en pos 51

		sint8 nLastGuildBack =	(sint8)(_MacroID&15);		// 4 bits en pos 0
		sint8 nLastGuildSymbol = (sint8)((_MacroID>>4)&63);	// 6 bits en pos 4

		NL3D::UDriver *Driver = CViewRenderer::getInstance()->getDriver();

		if (_GuildMat.empty())
		{
			_GuildMat = Driver->createMaterial();
			_GuildMat.initUnlit ();

			// Alpha blend must use current alpha
			_GuildMat.setBlend (true);
			_GuildMat.setBlendFunc (UMaterial::one, UMaterial::invsrcalpha);

			// Stages 0
			_GuildMat.texEnvOpRGB (0, UMaterial::Modulate);
			_GuildMat.texEnvArg0RGB (0, UMaterial::Texture, UMaterial::SrcColor);
			_GuildMat.texEnvArg1RGB (0, UMaterial::Diffuse, UMaterial::SrcColor);
			_GuildMat.texEnvOpAlpha (0, UMaterial::Modulate);
			_GuildMat.texEnvArg0Alpha (0, UMaterial::Texture, UMaterial::SrcAlpha);
			_GuildMat.texEnvArg1Alpha (0, UMaterial::Diffuse, UMaterial::SrcAlpha);

			// This is alpha material, so don't zwrite
			_GuildMat.setZWrite (false);
			_GuildMat.setBlendFunc (UMaterial::srcalpha, UMaterial::invsrcalpha);
		}

		if (nGuildInvert == 0)
		{
			// Stages 1
			_GuildMat.texEnvOpRGB (1, UMaterial::Modulate);
			_GuildMat.texEnvArg0RGB (1, UMaterial::Texture, UMaterial::SrcColor);
			_GuildMat.texEnvArg1RGB (1, UMaterial::Previous, UMaterial::SrcColor);
		}
		else
		{
			// Stages 1
			_GuildMat.texEnvOpRGB (1, UMaterial::Add);
			_GuildMat.texEnvArg0RGB (1, UMaterial::Texture, UMaterial::InvSrcColor);
			_GuildMat.texEnvArg1RGB (1, UMaterial::Previous, UMaterial::SrcColor);
		}

		_SheetColor = CRGBA(nGuildColBackR,nGuildColBackG,nGuildColBackB);
		_IconColor = CRGBA(nGuildColSymbR,nGuildColSymbG,nGuildColSymbB);

		if (nLastGuildBack != nGuildBack)
		{
			if (_GuildBack != NULL)
				Driver->deleteTextureFile(_GuildBack);
			_GuildBack = NULL;
			if (nGuildBack > 0)
			{
				string txName = toString("Guild_Back


/***********************************************************************
 * CM_Unregister_Device_InterfaceA [SETUPAPI.@]
 */
CONFIGRET
WINAPI
CM_Unregister_Device_InterfaceA(
    _In_ LPCSTR pszDeviceInterface,
    _In_ ULONG ulFlags)
{
    TRACE("CM_Unregister_Device_InterfaceA(%s %lx)\n",
          debugstr_a(pszDeviceInterface), ulFlags);

    return CM_Unregister_Device_Interface_ExA(pszDeviceInterface,
                                              ulFlags, NULL);
}

/***********************************************************************
 * CM_Unregister_Device_InterfaceW [SETUPAPI.@]
 */
CONFIGRET
WINAPI
CM_Unregister_Device_InterfaceW(
    _In_ LPCWSTR pszDeviceInterface,
    _In_ ULONG ulFlags)
{
    TRACE("CM_Unregister_Device_InterfaceW(%s %lx)\n",
          debugstr_w(pszDeviceInterface), ulFlags);

    return CM_Unregister_Device_Interface_ExW(pszDeviceInterface,
                                              ulFlags, NULL);
}

/***********************************************************************
 * CM_Unregister_Device_Interface_ExA [SETUPAPI.@]
 */
CONFIGRET
WINAPI
CM_Unregister_Device_Interface_ExA(
    _In_ LPCSTR pszDeviceInterface,
    _In_ ULONG ulFlags,
    _In_opt_ HMACHINE hMachine)
{
    LPWSTR pszDeviceInterfaceW = NULL;
    CONFIGRET ret;

    TRACE("CM_Unregister_Device_Interface_ExA(%s %lx %p)\n",
          debugstr_a(pszDeviceInterface), ulFlags, hMachine);

    if (pszDeviceInterface == NULL)
        return CR_INVALID_POINTER;

    if (pSetupCaptureAndConvertAnsiArg(pszDeviceInterface, &pszDeviceInterfaceW))
        return CR_INVALID_DATA;

    ret = CM_Unregister_Device_Interface_ExW(pszDeviceInterfaceW,
                                             ulFlags, hMachine);

    if (pszDeviceInterfaceW != NULL)
        MyFree(pszDeviceInterfaceW);

    return ret;
}

/***********************************************************************
 * CM_Unregister_Device_Interface_ExW [SETUPAPI.@]
 */
CONFIGRET
WINAPI
CM_Unregister_Device_Interface_ExW(
    _In_ LPCWSTR pszDeviceInterface,
    _In_ ULONG ulFlags,
    _In_opt_ HMACHINE hMachine)
{
    RPC_BINDING_HANDLE BindingHandle = NULL;
    CONFIGRET ret;

    TRACE("CM_Unregister_Device_Interface_ExW(%s %lx %p)\n",
          debugstr_w(pszDeviceInterface), ulFlags, hMachine);

    if (pszDeviceInterface == NULL)
        return CR_INVALID_POINTER;

    if (ulFlags != 0)
        return CR_INVALID_FLAG;

    if (hMachine != NULL)
    {
        BindingHandle = ((PMACHINE_INFO)hMachine)->BindingHandle;
        if (BindingHandle == NULL)
            return CR_FAILURE;
    }
    else
    {
        if (!PnpGetLocalHandles(&BindingHandle, NULL))
            return CR_FAILURE;
    }

    RpcTryExcept
    {
        ret = PNP_UnregisterDeviceClassAssociation(BindingHandle,
                                                   (LPWSTR)pszDeviceInterface,
                                                   ulFlags);
    }
    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
    {
        ret = RpcStatusToCmStatus(RpcExceptionCode());
    }
    RpcEndExcept;

    return ret;
}


EST_RESULTS_FILE, 'a')
    f.write(' execution time is ' + '{:.3f}'.format(time.time() - pytest.t_start) + ' sec\n\n')
    f.close()

@pytest.mark.update
def test_update_ref_values(lattice, cmdopt):

    update_functions = []
    update_functions.append('test_lattice_transfer_map')
    update_functions.append('test_natural_chromaticity')
    update_functions.append('test_tracking_step')
    update_functions.append('test_create_track_list')
    update_functions.append('test_track_nturns')

    if cmdopt in update_functions:
        result = eval(cmdopt)(lattice, True)

        if os.path.isfile(REF_RES_DIR + cmdopt + '.json'):
            os.rename(REF_RES_DIR + cmdopt + '.json', REF_RES_DIR + cmdopt + '.old')

        json_save(result, REF_RES_DIR + cmdopt + '.json')


="text/css">

{% end %}
{% block content %}

      track changes
      <input id="track" type="checkbox"/>

      α :
      β :
      γ :
      heading :

{% end %}{% extends "../../../theme/view_js.html" %}

{% block headinfo %}

<link rel="stylesheet" href="https://openlayers.org/en/v4.0.1/css/ol.css" type="text/css">

{% end %}
{% block content %}

    <button  class="btn btn-primary btn-sm" id="rotate-left" title="Rotate clockwise">↻</button>
    <button  class="btn btn-primary btn-sm" id="rotate-right" title="Rotate counterclockwise">↺</button>
    <button  class="btn btn-primary btn-sm" id="pan-to-london">Pan to London</button>
    <button  class="btn btn-primary btn-sm" id="elastic-to-moscow">Elastic to Moscow</button>
    <button  class="btn btn-primary btn-sm" id="bounce-to-istanbul">Bounce to Istanbul</button>
    <button  class="btn btn-primary btn-sm" id="spin-to-rome">Spin to Rome</button>
    <button  class="btn btn-primary btn-sm" id="fly-to-bern">Fly to Bern</button>
    <button  class="btn btn-primary btn-sm" id="rotate-around-rome">Rotate around Rome</button>
    <button  class="btn btn-prima


# -*- coding: utf-8 -*-
# INFO - G.M -17-05-2018 - CORS support
# original code from https://gist.github.com/mmerickel/1afaf64154b335b596e4
# see also
# here : https://groups.google.com/forum/#!topic/pylons-discuss/2Sw4OkOnZcE
from pyramid.events import NewResponse

from tracim_backend.config import CFG  # noqa: F401
from tracim_backend.lib.utils.authentication import CLIENT_TOKEN_HEADER

def add_cors_support(config):
    # INFO - G.M - 17-05-2018 - CORS Preflight stuff (special requests)
    config.add_directive("add_cors_preflight_handler", add_cors_preflight_handler)
    config.add_route_predicate("cors_preflight", CorsPreflightPredicate)

    # INFO - G.M - 17-05-2018 CORS Headers for all responses
    config.add_subscriber(add_cors_to_response, NewResponse)

class CorsPreflightPredicate(object):
    def __init__(self, val, config):
        self.val = val

    def text(self):
        return "cors_preflight = %s" % bool(self.val)

    phash = text

    def __call__(self, context, request):
        if not self.val:
            return False
        return (
            request.method == "OPTIONS"
            and "Origin" in request.headers
            and "Access-Control-Request-Method" in request.headers
        )

def add_cors_preflight_handler(config):
    # INFO - G.M - 17-05-2018 - Add route for CORS preflight
    # see https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request
    # for more info about preflight

    config.add_route("cors-options-preflight", "/{catch_all:.*}", cors_preflight=True)
    config.add_view(cors_options_view, route_name="cors-options-preflight")

def set_cors_headers(request, response):
    app_config = request.registry.settings["CFG"]  # type: CFG
    if (
        "Origin" in request.headers
        and request.headers["Origin"] in app_config.CORS__ACCESS_CONTROL_ALLOWED_ORIGIN
    ):
        response.headers[
            "Access-Control-Expose-Headers"
        ] = "Content-Type,Date,Content-Length,Authorization,X-Request-ID"
        response.headers["Access-Control-Allow-Origin"] = request.headers["Origin"]
        response.headers["Access-Control-Allow-Credentials"] = "true"
        response.headers["Vary"] = "Origin"

def cors_options_view(context, request):
    response = request.response
    # @TODO Côme - 2018/09/04 - I commented the test below because I can't work with for editing a file in app file.
    # I checked with GM and this test might require some fixes
    # if 'Access-Control-Request-Headers' in request.headers:
    response.headers[
        "Access-Control-Allow-Methods"
    ] = "OPTIONS,HEAD,GET,POST,PUT,DELETE,PROPFIND,PROPPATCH,REPORT,MOVE,LOCK,UNLOCK"
    response.headers[
        "Access-Control-Allow-Headers"
    ] = "Content-Type,Accept,Accept-Language,Authorization,X-Request-ID,X-client,Depth,Prefer,If-None-Match,If-match,{client_token_header}".format(
        client_token_header=CLIENT_TOKEN_HEADER
    )
    set_cors_headers(request, response)
    return response

def add_cors_to_response(event):
    # INFO - G.M - 17-05-2018 - Add some CORS headers to all requests
    request = event.request
    response = event.response
    set_cors_headers(request, response)


Thread(add2);
        thread1.start();
        thread2.start();
    }
}class Test extends Thread{
    private String id;
    public Test(String str){
        id = str;
    }
    public void run(){
        int i;
        for(i = 1; i <= 5; i++) {
            for(int j = 0; j < 100000000 ; j++);
            System.out.println(id+" "+i);
        }
    }
}
public class Ex03{
    public static void main(String[] args){
        Test hi = new Test("Hello");
        Test by = new Test("Good bye");
        Test morning = new Test("Good morning");
        Test night = new Test("Good night");
        hi.start();
        by.start();
        morning.start();
        night.start();
    }
}
// (d) 每次顯示的順序都不一樣package com.skilldistillery.celestial.controllers;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.skilldistillery.celestial.entities.Constellation;
import com.skilldistillery.celestial.services.ConstellationService;

import jakarta.servlet.http.HttpServletResponse;

@CrossOrigin({"*", "http://localhost/"})
@RestController
@RequestMapping("api")
public class ConstellationController {

	@Autowired
	private ConstellationService constellationService;

	@GetMapping(path = { "constellations", "constellations/" })
	public List<Constellation> findAllEnabledConstellations(HttpServletResponse resp) {
		List<Constellation> constellations = constellationService.listAllEnabled();
		if (!constellations.isEmpty()) {
			resp.setStatus(200);
		} else {
			resp.setStatus(404);
		}
		return constellations;
	}

	@GetMapping("admin/constellations")
	public List<Constellation> findAllConstellations(HttpServletResponse resp) {
		List<Constellation> constellations = constellationService.listAll();
		if (!constellations.isEmpty()) {
			resp.setStatus(200);
		} else {
			resp.setStatus(404);
		}
		return constellations;
	}

	@GetMapping("admin/constellations/{id}")
	public Constellation findConstellationsById(@PathVariable("id") int id, HttpServletResponse resp) {
		Constellation constellation = constellationService.findById(id);
		if (constellation != null) {
			resp.setStatus(200);
		} else {
			resp.setStatus(400);
		}
		return constellation;
	}

	@GetMapping("constellations/{id}")
	public Constellation findEnabledConstellationsById(@PathVariable("id") int id, HttpServletResponse resp) {
		Constellation constellation = constellationService.selectEnabledConstellationsById(id);
		if (constellation != null) {
			resp.setStatus(200);
		} else {
			resp.setStatus(400);
		}
		return constellation;
	}

	@PostMapping(path = { "constellations" })
	public Constellation createConst


 </td>

<td> Priti Shrivastav </td>

<td> open </td>

<td> 990603 </td>

<td> </td>

</tr>

<tr class=small> <td> 6 </td>

<td> Organize/summarize object layout issues and alternatives </td>

<td> Matt Austern </td>

<td> open </td>

<td> 990603 </td>

<td> </td>

</tr>

<tr class=small> <td> 7 </td>

<td> Write-up of Vtable issues </td>

<td> Christophe de Dinechin </td>

<td> open </td>

<td> 990610 </td>

<td> </td>

</tr>

<tr class=small> <td> 8 </td>

<td> Write-up of object layout strawman </td>

<td> Matt Austern </td>

<td> open </td>

<td> 990610 </td>

<td> </td>

</tr>

<tr class=small> <td> 9 </td>

<td> Check with c++-core about empty base placement </td>

<td> Jason Merrill </td>

<td> open </td>

<td> 990610 </td>

<td> </td>

</tr>

</table>

<p>

<hr>

<p>

<h4> Issue Status </h4>

In the following table,

the <b><i>class</i></b> column attempts to classify&nbsp


Extrabold Italic */
@font-face {
  font-family: 'Open Sans';
  src: url("./fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.eot?v=1.1.0");
  src: url("./fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.eot?#iefix&v=1.1.0") format("embedded-opentype"), url("./fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.woff2?v=1.1.0") format("woff2"), url("./fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.woff?v=1.1.0") format("woff"), url("./fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.ttf?v=1.1.0") format("truetype"), url("./fonts/ExtraBoldItalic/OpenSans-ExtraBoldItalic.svg?v=1.1.0#ExtraBoldItalic") format("svg");
  font-weight: 800;
  font-style: italic; }
/* END Extrabold Italic */
@import '@/assets/variables.less';

.toast {
  display: inline-flex;
  position: relative;
  flex-direction: row;
  align-items: center;
  color: var(--primary-text-color);
  background: #fff;
  transform: translate(-50%, 0);
  animation: fadeIn 0.2s 1 ease-in;
  box-shadow: 0 3px 6px -4px #dcdbdf, 0 6px 16px 0 #dcdbdf;
  height: 48px;
  padding: 0 24px 0 18px;
  border-radius: 8px;
  left: 50%;
  top: 16px;
  &.centerInChat {
    left: calc(50% + 136px);
    top: 72px;
  }

  > span {
    flex-shrink: 0;
  }

  .icon {
    margin-right: 8px;
  }

  .success {
    color: #009431;
  }

  .warning {
    color: #ffab1b;
  }

  .error {
    color: #e63224;
  }
  .loading {
    animation: spin 2s ease-in-out infinite;
  }
}

.fadeout {
  animation: fadeout 0.2s 1 ease-in;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(180deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  0% {
    transform: translate(-50%, -100%);
    opacity: 0;
  }

  100% {
    transform: translateY(-50%, 0);
    opacity: 1;
  }
}

@keyframes fadeout {
  0% {
    transform: translate(-50%, 0);
    opacity: 1;
  }

  100% {
    transform: translateY(-50%, -100%);
    opacity: 0;
  }
}

@media only screen and (max-width: 767px) {
  .toast {
    font-size: 12px;
  }
}
.custom-markdown {
  &-markdownContent {
    min-height: 100%;
    //font-size: 13px;
    background: none;

    * {
      color: var(--primary-text-color);
      word-break: break-all;
    }

    ol li {
      font-size: 16px;
      line-height: 28px;
      list-style: normal;
      list-


    --highcharts-color-5: #ff0066;
    --highcharts-color-6: #eeaaee;
    --highcharts-color-7: #55bf3b;
    --highcharts-color-8: #df5353;
    --highcharts-color-9: #7798bf;
}

/* General */
.highcharts-container {
    background: url(https://www.highcharts.com/samples/graphics/sand.png);
    font-family: Signika, arial, helvetica, sans-serif;
}

.highcharts-axis-labels {
    font-size: 1em;
}

.highcharts-tooltip-box {
    stroke-width: 0;
    fill: #ffffff;
}

.highcharts-legend-item > text {
    font-size: 1.1em;
}

/* Boxplot */
.highcharts-boxplot-box {
    fill: #505053;
}

/* Navigator */
.highcharts-navigator-xaxis .highcharts-grid-line {
    stroke: #d0d0d8;
}

.highcharts-navigator-series {
    fill: var(--highcharts-color-0);
    stroke: var(--highcharts-color-0);
}

/* Scrollbar */
.highcharts-scrollbar-track {
    stroke: #c0c0c8;
    fill: #f2f2f2;
}

/* Title */
.highcharts-title {
    font-weight: bold;
}

/* Buttons */
.highcharts-button {
    fill: #ffffff;
    stroke: #c0c0c8;
}

.highcharts-button text {
    fill: #000000;
}

.highcharts-button-pressed {
    fill: #d0d0d8;
}

.highcharts-button-box {
    stroke-width: 1px;
}
$light-5: rgba(255, 255, 255, 0.05);
$light-10: rgba(255, 255, 255, 0.1);
$light-20: rgba(255, 255, 255, 0.2);
$light-40: rgba(255, 255, 255, 0.4);
$light-60: rgba(255, 255, 255, 0.6);
$light-80: rgba(255, 255, 255, 0.8);
$light-100: rgba(255, 255, 255, 1);

$dark-5: rgba(0, 0, 0, 0.05);
$dark-10: rgba(0, 0, 0, 0.1);
$dark-20: rgba(0, 0, 0, 0.2);
$dark-40: rgba(0, 0, 0, 0.4);
$dark-60: rgba(0, 0, 0, 0.6);
$dark-80: rgba(0, 0, 0, 0.8);
$dark-100: rgba(0, 0, 0, 1);

$green-5: rgba(76, 237, 160, 0.05);
$green-10: rgba(76, 237, 160, 0.1);
$green-20: rgba(76, 237, 160, 0.2);
$green-40: rgba(76, 237, 160, 0.4);
$green-60: rgba(76, 237, 160, 0.6);
$green-80: rgba(76, 237, 160, 0.8);
$green-100: rgba(76, 237, 160, 1);

$red-5: rgba(255, 57, 93, 0.05);
$red-10: rgba(255, 57, 93, 0.1);
$red-20: rgba(255, 57, 93, 0.2);
$red-40: rgba(255, 57, 93, 0.4);
$red-60: rgba(255, 57, 93, 0.6);
$red-80: rgba(255, 57, 93, 0.8);
$red-100: rgba(255, 57, 93, 1);

$primary-5: rgba(0, 250, 2


ent: var(--ultramarine);
  --accent-h: 228;
  --accent-s: 100%;
  --accent-l: 68%;
}

.predefined-accent-color.accent-denim {
  --accent: var(--denim);
  --accent-h: 235;
  --accent-s: 22%;
  --accent-l: 38%;
}

.predefined-accent-color.accent-mauve {
  --accent: var(--mauve);
  --accent-h: 287;
  --accent-s: 30%;
  --accent-l: 41%;
}

.predefined-accent-color.accent-bubblegum {
  --accent: var(--bubblegum);
  --accent-h: 352;
  --accent-s: 100%;
  --accent-l: 85%;
}

.predefined-accent-color.accent-wine {
  --accent: var(--wine);
  --accent-h: 353;
  --accent-s: 42%;
  --accent-l: 32%;
}

.predefined-accent-color.accent-slate {
  --accent: var(--slate);
  --accent-h: 211;
  --accent-s: 10%;
  --accent-l: 56%;
}

/* Text on accent */
.accent-mustard,
.accent-turquoise,
.accent-bubblegum {
  --text-on-accent: #353132;
}

.colorful-tooltips.accent-turquoise .tooltip,
.colorful-tooltips.accent-mustard .tooltip,
.colorful-tooltips.accent-bubblegum .tooltip,
.colorful-tooltips.accent-pumpkin .tooltip {
  color: var(--text-on-accent);
}

/* Accent color + Style Settings - Message override */
.predefined-accent-color
  .mod-settings
  .vertical-tab-content
  > .setting-item:nth-child(2)
  > .setting-item-control
  > input[type="color"] {
  visibility: hidden;
  width: 12rem;
}

.predefined-accent-color
  .mod-settings
  .vertical-tab-content
  > .setting-item:nth-child(2)
  > .setting-item-control
  .lucide-rotate-ccw {
  display: none;
}

.predefined-accent-color
  .mod-settings
  .vertical-tab-content
  > .setting-item:nth-child(2)
  > .setting-item-control
  > input[type="color"]::before {
  visibility: visible;
  content: "Open the Style Settings plugin to pick your accent colors.";
  color: var(--text-error);
  font-size: var(--font-ui-smaller);
}

/* INTERFACE ---------------------*/
/* Borders */
.border-invisible {
  --divider-color: transparent;
}

.border-invisible .workspace-ribbon.mod-left:before {
  border-bottom-color: var(--background-secondary);
}

.border-visible
  .workspace
  .mod-root
  .workspace-tabs.mod-stacked
  .workspace-tab-container
  .workspace-tab-header {
  border-right: 1px solid var(--divider-color);
  box-shadow: var(--tab-stacked-shadow);
}

.border-invisible .setting-item {
  border-top: none;
}

/* File Explorer */
.nav-buttons-container {
  justify-content: flex-start;
  padding-left: 0.5em;
  padding-top: 0