p;
  if (den === 0) return null;
  const m = orient2D(cx, cy, dx, dy, ax, ay) / den;
  if (den <= eps && den >= -eps) {
    // tiny denominator = low precision; using one of the endpoints as intersection
    p = findEndpointInRange(ax, ay, bx, by, cx, cy, dx, dy);
    /*if (!p) {
      debug("[lineIntersection()]");
      debugSegmentIntersection([], ax, ay, bx, by, cx, cy, dx, dy);
    }*/
  } else {
    p = [ax + m * (bx - ax), ay + m * (by - ay)];
  }
  return p;
}

function findEndpointInRange(
  ax: any,
  ay: any,
  bx: any,
  by: any,
  cx: any,
  cy: any,
  dx: any,
  dy: any
) {
  let p = null;
  if (!outsideRange(ax, cx, dx) && !outsideRange(ay, cy, dy)) {
    p = [ax, ay];
  } else if (!outsideRange(bx, cx, dx) && !outsideRange(by, cy, dy)) {
    p = [bx, by];
  } else if (!outsideRange(cx, ax, bx) && !outsideRange(cy, ay, by)) {
    p = [cx, cy];
  } else if (!outsideRange(dx, ax, bx) && !outsideRange(dy, ay, by)) {
    p = [dx, dy];
  }
  return p;
}

// a: coordinate of point
// b: endpoint coordinate of segment
// c: other endpoint of segment
function outsideRange(a: any, b: any, c: any) {
  let out;
  if (b < c) {
    out = a < b || a > c;
  } else if (b > c) {
    out = a > b || a < c;
  } else {
    out = a != b;
  }
  return out;
}

// Return id of nearest point to x, y, among x0, y0, x1, y1, ...
function nearestPoint(x: any, y: any, ...args: any[]) {
  let minIdx = -1,
    minDist = Infinity,
    dist;
  for (let i = 0, j = 0, n = args.length; j < n; i++, j += 2) {
    dist = distanceSq(x, y, args[j], args[j + 1]);
    if (dist < minDist) {
      minDist = dist;
      minIdx = i;
    }
  }
  return minIdx;
}

function distanceSq(ax: any, ay: any, bx: any, by: any) {
  const dx = ax - bx,
    dy = ay - by;
  return dx * dx + dy * dy;
}

function clampIntersectionPoint(
  p: any,
  ax: any,
  ay: any,
  bx: any,
  by: any,
  cx: any,
  cy: any,
  dx: any,
  dy: any
) {
  // Handle intersection points that fall outside the x-y range of either
  // segment by snapping to nearest endpoint coordinate. Out-of-range
  // intersection points can be caused by floating point rounding errors
  // when a segment is vertical or horizontal. This has caused problems when
  // repeatedly applying bbox clipping along the same segment
  let x = p[0],
    y = p[1];
  // assumes that segment ranges intersect
  x = clampToCloseRange(x, ax, bx);
  x = clampToCloseRange(x, cx, dx);
  y = clampToCloseRange(y, ay, by);
  y = clampToCloseRange(y, cy, dy);
  p[0] = x;
  p[1] = y;
}

function clampToCloseRange(a: any, b: any,


    )

    # By default we only return detailed information about expired or
    # warning certificates. If show_all is true then we will print all
    # the certificates examined.
    if not module.params['show_all']:
        check_results['ocp_certs'] = [crt for crt in ocp_certs if crt['health'] in ['expired', 'warning']]
        check_results['kubeconfigs'] = [crt for crt in kubeconfigs if crt['health'] in ['expired', 'warning']]
        check_results['etcd'] = [crt for crt in etcd_certs if crt['health'] in ['expired', 'warning']]
        check_results['registry'] = [crt for crt in registry_certs if crt['health'] in ['expired', 'warning']]
        check_results['router'] = [crt for crt in router_certs if crt['health'] in ['expired', 'warning']]
    else:
        check_results['ocp_certs'] = ocp_certs
        check_results['kubeconfigs'] = kubeconfigs
        check_results['etcd'] = etcd_certs
        check_results['registry'] = registry_certs
        check_results['router'] = router_certs

    # Sort the final results to report in order of ascending safety
    # time. That is to say, the certificates which will expire sooner
    # will be at the front of the list and certificates which will
    # expire later are at the end. Router and registry certs should be
    # limited to just 1 result, so don't bother sorting those.
    def cert_key(item):
        ''' return the days_remaining key '''
        return item['days_remaining']

    check_results['ocp_certs'] = sorted(check_results['ocp_certs'], key=cert_key)
    check_results['kubeconfigs'] = sorted(check_results['kubeconfigs'], key=cert_key)
    check_results['etcd'] = sorted(check_results['etcd'], key=cert_key)

    # This module will never change anything, but we might want to
    # change the return code parameter if there is some catastrophic
    # error we noticed earlier
    module.exit_json(
        check_results=check_results,
        warn_certs=warn_certs,
        summary=res,
        msg=msg,
        rc=0,
        changed=False
    )

if __name__ == '__main__':
    main()


nding_outpoint: OutPoint, monitor: ChannelMonitor<ChanSigner>) -> Result<(), ChannelMonitorUpdateErr> {
		let mut monitors = self.monitors.lock().unwrap();
		let entry = match monitors.entry(funding_outpoint) {
			hash_map::Entry::Occupied(_) => {
				log_error!(self.logger, "Failed to add new channel data: channel monitor for given outpoint is already present");
				return Err(ChannelMonitorUpdateErr::PermanentFailure)},
			hash_map::Entry::Vacant(e) => e,
		};
		if let Err(e) = self.persister.persist_new_channel(funding_outpoint, &monitor) {
			log_error!(self.logger, "Failed to persist new channel data");
			return Err(e);
		}
		{
			let funding_txo = monitor.get_funding_txo();
			log_trace!(self.logger, "Got new Channel Monitor for channel {}", log_bytes!(funding_txo.0.to_channel_id()[..]));

			if let Some(ref chain_source) = self.chain_source {
				chain_source.register_tx(&funding_txo.0.txid, &funding_txo.1);
				for (txid, outputs) in monitor.get_outputs_to_watch().iter() {
					for (idx, script_pubkey) in outputs.iter() {
						chain_source.register_output(&OutPoint { txid: *txid, index: *idx as u16 }, script_pubkey);
					}
				}
			}
		}
		entry.insert(monitor);
		Ok(())
	}

	/// Note that we persist the given `ChannelMonitor` update while holding the
	/// `ChainMonitor` monitors lock.
	fn update_channel(&self, funding_txo: OutPoint, update: ChannelMonitorUpdate) -> Result<(), ChannelMonitorUpdateErr> {
		// Update the monitor that watches the channel referred to by the given outpoint.
		let mut monitors = self.monitors.lock().unwrap();
		match monitors.get_mut(&funding_txo) {
			None => {
				log_error!(self.logger, "Failed to update channel monitor: no such monitor registered");

				// We should never ever trigger this from within ChannelManager. Technically a
				// user could use this object with some proxying in between which makes this
				// possible, but in tests and fuzzing, this should be a panic.
				#[cfg(any(test, feature = "fuzztarget"))]
				panic!("ChannelManager generated a channel update for a channel that was not yet registered!");
				#[cfg(not(any(test, feature = "fuzztarget")))]
				Err(ChannelMonitorUpdateErr::PermanentFailure)
			},
			Some(orig_monitor) => {
				log_trace!(self.logger, "Updating Channel Monitor for channel {}", log_funding_info!(orig_monitor));
				let update_res = orig_monitor.update_monitor(&update, &self.broadcaster, &self.fee_estimator, &self.logger);
				if let Err(e) = &update_res {
					log_error!(self.logger, "Failed to update channel monitor: {:?}", e);
				}
				// Even if updating the monitor returns an error, the monitor's state will
				// still be changed. So, persist the updated monitor despite the error.
				let persist_res = self.persister.update_persisted_channel(funding_txo, &update, orig_monitor);
				if let Err(ref e) = persist_res {
					log_error!(self.logger, "Failed to persist channel monitor update: {:?}", e);
				}
				if update_res.is_err() {
					Err(ChannelMonitorUpdateErr::PermanentFailure)
				} else {
					persist_res
				}
			}
		}
	}

	fn release_pending_monitor_events(&self) -> Vec<MonitorEvent> {
		let mut pending_monitor_events = Vec::new();
		for chan in self.monitors.lock().unwrap().values_mut() {
			pending_monitor_events.append(&mut chan.get_and_clear_pending_


See <see cref="CallbackFunction"/> for information regarding the standard callback signature along with easier ways
	/// to marshal methods.
	///
	/// See <see cref="UserData"/> for easier object marshalling.
	/// </summary>
	[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
	public sealed class WattleScriptModuleAttribute : Attribute
	{
		/// <summary>
		/// Gets or sets the namespace, that is the name of the table which will contain the defined functions.
		/// Can be null to be in the global table.
		/// </summary>
		public string Namespace { get; set; }
	}
}


 (Envelope) geometry,
					shapeBuffer);
		default: {
			throw GeometryException.GeometryInternalError();
			// return -1;
		}
		}
	}

	private static int exportEnvelopeToESRIShape(int exportFlags,
			Envelope envelope, ByteBuffer shapeBuffer) {
		boolean bExportZs = envelope.hasAttribute(Semantics.Z)
				&& (exportFlags & ShapeExportFlags.ShapeExportStripZs) == 0;
		boolean bExportMs = envelope.hasAttribute(Semantics.M)
				&& (exportFlags & ShapeExportFlags.ShapeExportStripMs) == 0;
		boolean bExportIDs = envelope.hasAttribute(Semantics.ID)
				&& (exportFlags & ShapeExportFlags.ShapeExportStripIDs) == 0;
		boolean bArcViewNaNs = (exportFlags & ShapeExportFlags.ShapeExportTrueNaNs) == 0;

		boolean bEmpty = envelope.isEmpty();
		int partCount = bEmpty ? 0 : 1;
		int pointCount = bEmpty ? 0 : 5;

		int size = (4 /* type */) + (4 * 8 /* envelope */) + (4 /* part count */)
				+ (4 /* point count */) + (partCount * 4 /* start indices */)
				+ pointCount * 2 * 8 /* xy coordinates */;

		if (bExportZs)
			size += (2 * 8 /* min max */) + (pointCount * 8 /* zs */);
		if (bExportMs)
			size += (2 * 8 /* min max */) + (pointCount * 8 /* ms */);
		if (bExportIDs)
			size += (pointCount * 4 /* ids */);

		if (shapeBuffer == null)
			return size;
		else if (shapeBuffer.capacity() < size)
			throw new GeometryException("buffer is too small");

		int type;

		// Determine the shape type
		if (!bExportZs && !bExportMs) {
			if (bExportIDs)
				type = ShapeType.ShapeGeneralPolygon
						| ShapeModifiers.ShapeHasIDs;
			else
				type = ShapeType.ShapePolygon;
		} else if (bExportZs && !bExportMs) {
			if (bExportIDs)
				type = ShapeType.ShapeGeneralPolygon
						| ShapeModifiers.ShapeHasZs
						| ShapeModifiers.ShapeHasIDs;
			else
				type = ShapeType.ShapePolygonZ;
		} else if (bExportMs && !bExportZs) {
			if (bExportIDs)
				type = ShapeType.ShapeGeneralPolygon
						| ShapeModifiers.ShapeHasMs
						| ShapeModifiers.ShapeHasIDs;
			else
				type = ShapeType.ShapePolygonM;
		} else {
			if (bExportIDs)
				type = ShapeType.ShapeGeneralPolygon
						| ShapeModifiers.ShapeHasZs | ShapeModifiers.ShapeHasMs
						| ShapeModifiers.ShapeHasIDs;
			else
				type = ShapeType.ShapePolygonZM;
		}

		int offset = 0;

		// write type
		shapeBuffer.putInt(offset, type);
		offset += 4;

		// write Envelope
		Envelope2D env = new Envelope2D();
		envelope.queryEnvelope2D(env); // calls _VerifyAllStreams
		shapeBuffer.putDouble(offset, env.xmin);
		offset += 8;
		shapeBuffer.putDouble(offset, env.ymin);
		offset += 8;
		shapeBuffer.putDouble(offset, env.xmax);
		offset += 8;
		shapeBuffer.putDouble(offset, env.ymax);
		offset += 8;

		// write part count
		shapeBuffer.putInt(offset, partCount);
		offset += 4;

		// write pointCount
		shapeBuffer.putInt(offset, pointCount);
		offset += 4;

		if (!bEmpty) {
			// write start index
			shapeBuffer.putInt(offset, 0);
			offset += 4;

			// write xy coordinates
			shapeBuffer.putDouble(offset, env.xmin)


/**
  ******************************************************************************
  * @file    hw_config.h
  * @author  WI6LABS
  * @version V1.0.0
  * @date    01-August-2016
  * @brief   Header for hw_config module
  ******************************************************************************
  * @attention
  *
  *
© COPYRIGHT(c) 2016 STMicroelectronics

  *
  * Redistribution and use in source and binary forms, with or without modification,
  * are permitted provided that the following conditions are met:
  *   1. Redistributions of source code must retain the above copyright notice,
  *      this list of conditions and the following disclaimer.
  *   2. Redistributions in binary form must reproduce the above copyright notice,
  *      this list of conditions and the following disclaimer in the documentation
  *      and/or other materials provided with the distribution.
  *   3. Neither the name of STMicroelectronics nor the names of its contributors
  *      may be used to endorse or promote products derived from this software
  *      without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  ******************************************************************************
  */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __HW_CONFIG_H
#define __HW_CONFIG_H

/* Includes ------------------------------------------------------------------*/
#include "stm32_def.h"

#ifdef __cplusplus
extern "C" {
#endif

/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */

void hw_config_init(void);

#ifdef __cplusplus
}
#endif

#endif /* __HW_CONFIG_H */

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/


td>

AArch64	TLBIP VALE1, TLBIP VALE1NXS	TLB Invalidate Pair by VA, Last level, EL1

AArch64	TLBIP VALE1IS, TLBIP VALE1ISNXS	TLB Invalidate Pair by VA, Last level, EL1, Inner Shareable

AArch64	TLBIP VALE1OS, TLBIP VALE1OSNXS	TLB Invalidate Pair by VA, Last level, EL1, Outer Shareable

AArch64	TLBIP VALE2, TLBIP VALE2NXS	TLB Invalidate Pair by VA, Last level, EL2

AArch64	TLBIP VALE2IS, TLBIP VALE2ISNXS	TLB Invalidate Pair by VA, Last level, EL2, Inner Shareable

AArch64	TLBIP VALE2OS, TLBIP VALE2OSNXS	TLB Invalidate Pair by VA, Last level, EL2, Outer Shareable

AArch64	TLBIP VALE3, TLBIP VALE3NXS	TLB Invalidate Pair by VA, Last level, EL3

AArch64	TLBIP VALE3IS, TLBIP VALE3ISNXS	TLB Invalidate Pair by VA, Last level, EL3, Inner Shareable

AArch64	TLBIP VALE3OS, TLBIP VALE3OSNXS	TLB Invalidate Pair by VA, Last level, EL3, Outer Shareable

		        In the PMU functional group:

Exec state	Name	Description

AArch32	PMCCFILTR	Performance Monitors Cycle Count Filter Register

AArch32	PMCCNTR	Performance Monitors Cycle Count Register

AArch32	PMCEID0	Performance Monitors Common Event Identification register 0

AArch32	PMCEID1	Performance Monitors Common E


ervice

object PopupWidgets {

    fun showPluginLanguageSettings(e: AnActionEvent) {
        val languages = listOf("System", "English", "中文", "繁體", "한국어", "日本語")
        val group = DefaultActionGroup()
        lateinit var pop: ListPopup
        languages.forEach { lang ->
            group.add(object : ToggleAction(lang) {
                override fun isSelected(e: AnActionEvent): Boolean {
                    return PluginStateService.appSetting.lang == lang
                }

                override fun setSelected(e: AnActionEvent, state: Boolean) {
                    if (state) {
                        PluginStateService.changeState {
                            it.copy(lang = lang)
                        }
                        pop.cancel()
                        restartWithConfirmation()
                    }
                }

                override fun getActionUpdateThread(): ActionUpdateThread {
                    return ActionUpdateThread.BGT
                }
            })
        }

        pop = JBPopupFactory.getInstance().createActionGroupPopup(
            PluginBundle.get("setting.language"),
            group,
            e.dataContext,
            JBPopupFactory.ActionSelectionAid.SPEEDSEARCH,
            true
        )
        e.project?.let { pop.showCenteredInCurrentWindow(it) }
    }

    fun restartWithConfirmation() {
        val app = ApplicationManagerEx.getApplicationEx()

        if (GeneralSettings.getInstance().isConfirmExit) {
            val answer = Messages.showYesNoDialog(
                IdeBundle.message(if (app.isRestartCapable) "dialog.message.restart.ide" else "dialog.message.restart.alt"),
                IdeBundle.message("dialog.title.restart.ide"),
                IdeBundle.message(if (app.isRestartCapable) "ide.restart.action" else "ide.shutdown.action"),
                CommonBundle.getCancelButtonText(),
                Messages.getQuestionIcon()
            )
            if (answer != Messages.YES) {
                return
            }
        }
        app.restart(true)
    }
}
package shop.itbug.fluttercheckversionx.widget

import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
import androidx.compose.runtime.*
import androidx.compose.runtime.snapshots.SnapshotStateMap
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.google.gson.Gson
import com.google.gson.JsonElement
import org.jetbrains.jewel.ui.component.Icon
import org.jetbrains.jewel.ui.component.Text
import org.jetbrains.jewel.ui.icons.AllIconsKeys

sealed class JsonTreeNode {
    data class ValueNode(
        val key: String,
        val value: String,
        val style: TextStyle
    ) : JsonTreeNode()

    data class ObjectNode(
        val key: String,
        val children: List<JsonTreeNode>
    ) : JsonTreeNode()

    data class ArrayNode(
        val key: String,
        val children: List<JsonTreeNode>
    ) : JsonTreeNode()

    fun getNodeKey(): String {
        return when (this) {
            is ValueNode -> key
            is ObjectNode -> key
            is ArrayNode -> key
        }
    }
}

@Composable
fun GsonJsonTree(jsonElement: JsonElement) {
    val expandedStates = remember { mutableStateMapOf<String, MutableState<Boolean>>() }
    val rootNode = remember(json


long string",

			input: CLIGoldenInput{
				modeStdin:  modeTerminal,
				modeStdout: modeTerminal,
				modeStderr: modeTerminal,

				inputArgs: []string{"html2markdown", strings.Repeat("12456789", 40)},
			},
		},
		{
			desc: "[argument unknown] list of files",

			input: CLIGoldenInput{
				modeStdin:  modeTerminal,
				modeStdout: modeTerminal,
				modeStderr: modeTerminal,

				// The ** was treated as a file glob
				inputArgs: []string{"html2markdown", "--opt-strong-delimiter", "CONTRIBUTING.md", "README.md", "SECURITY.md", "a.html", "b.html", "c.html", "d.html", "e.html", "f.html"},
			},
		},

		// - - - - - flags - - - - - //
		{
			desc: "[flag unknown] with pipe",

			input: CLIGoldenInput{
				modeStdin:  modePipe,
				modeStdout: modePipe,
				modeStderr: modePipe,

				inputArgs: []string{"html2markdown", "--this-does-not-exist"},
			},
		},
		{
			desc: "[flag unknown] with terminal",

			input: CLIGoldenInput{
				modeStdin:  modeTerminal,
				modeStdout: modeTerminal,
				modeStderr: modeTerminal,

				inputArgs: []string{"html2markdown", "--this-does-not-exist"},
			},
		},

		{
			desc: "[flag misspelled] underscore",

			input: CLIGoldenInput{
				modeStdin:  modePipe,
				modeStdout: modePipe,
				modeStderr: modePipe,

				inputStdin: []byte("text"),
				// Someone accidentally used underscores instead of dashes
				inputArgs: []string{"html2markdown", "--opt_strong_delimiter="},
			},
		},

		// - - - - - converting - - - - - //
		{
			desc: "[convert] strong default",

			input: CLIGoldenInput{
				modeStdin:  modePipe,
				modeStdout: modePipe,
				modeStderr: modePipe,

				inputStdin: []byte("text"),
				inputArgs:  []string{"html2markdown"},
			},
		},
		{
			desc: "[convert] strong equal underscore",

			input: CLIGoldenInput{
				modeStdin:  modePipe,
				modeStdout: modePipe,
				modeStderr: modePipe,

				inputStdin: []byte("text"),
				// Note: We dont test the quoted version "__" since that is already unquoted by bash/go
				inputArgs: []string{"html2markdown", `--opt-strong-delimiter=__`},
			},
		},
		{
			desc: "[convert] strong space underscore",

			input: CLIGoldenInput{
				modeStdin:  modePipe,
				modeStdout: modePipe,
				modeStderr: modePipe,

				inputStdin: []byte("text"),
				inputArgs:  []string{"html2markdown", `--opt-strong-delimiter`, `__`},
			},
		},
		{
			desc: "[convert] collapse",

			input: CLIGoldenInput{
				modeStdin:  modePipe,
				modeStdout: modePipe,
				modeStderr: modePipe,

				inputStdin: []byte("
Some     bold     text
"),
				inputArgs:  []string{"html2markdown"},
			},
		},

		// - - - - - selectors - - - - - //
		{
			desc: "[include-selector] one match",

			input: CLIGoldenInput{
				modeStdin:  modePipe,
				modeStdout: modePipe,


     let input = Vec::new();
        let reset = false;

        // default remappings
//		remap.insert(0, include!("remapping/game_cube.rs"));
//		remap.push(include!("remapping/default.rs"));

        ControllerManager {
            c_manager, controllers, remap, input, reset
        }
    }

    /// Poll Joystick Input.  Returns an `Option` for use in a `while let`.
    /// The tuple within the `Some` variant is controller id (starting at 0),
    /// followed by the input event for that controller.
    pub fn update(&mut self) {
        self.reset = true;

        let (device_count, added) = self.c_manager.search();

        if added != ::std::usize::MAX {
            self.controllers.resize(device_count, NEW_CONTROLLER);
        }

        for i in 0..device_count {
            let (fd, is_out, ne) = self.c_manager.get_fd(i);

            if ne { continue }
            if is_out {
                self.input.push((i, Input::UnPlugged(
                    self.controllers[i].id)));
                self.c_manager.disconnect(fd);
                continue;
            }

            if added == i {
                let (min, max, _) = self.c_manager.get_abs(i);

                self.controllers[i].oldstate.min = min;
                self.controllers[i].oldstate.max = max;
                self.controllers[i].state.min = min;
                self.controllers[i].state.max = max;
                self.controllers[i].id =
                    self.c_manager.get_id(i).0;

                self.input.push((i, Input::PluggedIn(
                    self.controllers[i].id)))
            }

            self.c_manager.poll_event(i, &mut self.controllers[i].state);

            // TODO: This code is garbage.  Fix it.  Preferably not
            // macros, but maybe is necesity.
            check_axis(&mut self.input, i,
                self.controllers[i].state.left_throttle, false);
            check_axis(&mut self.input, i,
                self.controllers[i].state.right_throttle, true);

            if self.controllers[i].state.move_xy != (0.0, 0.0) {
                self.input.push((i, Input::Move(
                    self.controllers[i].state.move_xy.0,
                    self.controllers[i].state.move_xy.1))
                );
            }

            if self.controllers[i].state.cam_xy != (0.0, 0.0) {
                self.input.push((i, Input::Camera(
                    self.controllers[i].state.cam_xy.0,
                    self.controllers[i].state.cam_xy.1))
                );
            }

            // Button ( previous TODO is continued ... )
            if self.controllers[i].state.accept
                != self.controllers[i].oldstate.accept
            {
                self.input.push((i, match self.controllers[i].state.accept {
                    false => Input::Accept(None),
                    true => Input::Accept(Some(true)),
                }));
                self.controllers[i].oldstate.accept =
                    self.controllers[i].state.accept;


记比用手机打字记得更牢（身体动作影响记忆）、在安静的书房比在吵闹的街头更容易专注（环境影响注意力），但身体感觉、环境因素具体如何“塑造”认知？还需要更深入的研究。

### 4. 社会与文化如何塑造认知？
人类是社会性动物，但认知心理学过去常忽略“社会属性”的影响。比如中国人的“集体主义思维”（更看重团队意见）和西方人的“个人主义思维”（更看重个人需求），在判断、决策上有什么差异？人际关系、文化习俗如何潜移默化地改变我们的认知方式？这些问题还需探索。

### 5. 认知能力为什么难“迁移”？
很多在某一领域表现突出的人，在其他领域可能很普通——比如围棋大师可能不擅长理财，数学学霸可能不会修家电。为什么在一个领域训练出的认知能力（比如逻辑思维），很难用到其他领域？如何促进能力“迁移”？至今没有明确答案。

认知心理学虽然已经揭示了很多人类认知的规律，但面对“心理活动的复杂性”，仍有不少谜题待解。未来需要结合脑科学、社会学等多学科方法，才能更全面地理解“人为什么会这样思考”。# 盈利动量策略：跟着上涨趋势赚钱的量化投资法
盈利动量策略，简单说就是**买过去一段时间涨得好的股票，赌它们未来还能接着涨**。这个策略的核心逻辑是“强者恒强”——过去表现强势的股票，未来大概率会继续保持强势。它是A股市场中常用的量化投资策略之一，尤其适合趋势明确的行情。

### 一、核心概念：搞懂这两个词就入门
1.  **动量**：不是物理学的“动量”，而是指股票在一段时间内的上涨“劲头”，比如过去20天涨了15%，这个“15%”就是它的动量（正数代表上涨，负数代表下跌）。
2.  **均线**：股票一段时间内的平均价格，是判断趋势的核心工具。
    - 短期均线（如5日、10日均线）：反映最近几天的价格走势，变化快；
    - 长期均线（如20日、60日均线）：反映几个月的大趋势，更�


close(struct input_dev *input_dev)
{
	struct da9052_tsi *tsi = input_get_drvdata(input_dev);

	tsi->stopped = true;
	mb();
	da9052_disable_irq(tsi->da9052, DA9052_IRQ_PENDOWN);
	cancel_delayed_work_sync(&tsi->ts_pen_work);

	if (tsi->adc_on) {
		da9052_disable_irq(tsi->da9052, DA9052_IRQ_TSIREADY);
		da9052_ts_adc_toggle(tsi, false);

		/*
		 * If ADC was on that means that pendwn IRQ was disabled
		 * twice and we need to enable it to keep enable/disable
		 * counter balanced. IRQ is still off though.
		 */
		da9052_enable_irq(tsi->da9052, DA9052_IRQ_PENDOWN);
	}

	/* Disable Pen Detect Circuit */
	da9052_reg_update(tsi->da9052, DA9052_TSI_CONT_A_REG, 1 << 1, 0);
}

static int da9052_ts_probe(struct platform_device *pdev)
{
	struct da9052 *da9052;
	struct da9052_tsi *tsi;
	struct input_dev *input_dev;
	int error;

	da9052 = dev_get_drvdata(pdev->dev.parent);
	if (!da9052)
		return -EINVAL;

	tsi = kzalloc(sizeof(struct da9052_tsi), GFP_KERNEL);
	input_dev = input_allocate_device();
	if (!tsi || !input_dev) {
		error = -ENOMEM;
		goto err_free_mem;
	}

	tsi->da9052 = da9052;
	tsi->dev = input_dev;
	tsi->stopped = true;
	INIT_DELAYED_WORK(&tsi->ts_pen_work, da9052_ts_pen_work);

	input_dev->id.version = 0x0101;
	input_dev->id.vendor = 0x15B6;
	input_dev->id.product = 0x9052;
	input_dev->name = "Dialog DA9052 TouchScreen Driver";
	input_dev->dev.parent = &pdev->dev;
	input_dev->open = da9052_ts_input_open;
	input_dev->close = da9052_ts_input_close;

	__set_bit(EV_ABS, input_dev->evbit);
	__set_bit(EV_KEY, input_dev->evbit);
	__set_bit(BTN_TOUCH, input_dev->keybit);

	input_set_abs_params(input_dev, ABS_X, 0, 1023, 0, 0);
	input_set_abs_params(input_dev, ABS_Y, 0, 1023, 0, 0);
	input_set_abs_params(input_dev, ABS_PRESSURE, 0, 1023, 0, 0);

	input_set_drvdata(input_dev, tsi);

	/* Disable Pen Detect Circuit */
	da9052_reg_update(tsi->da9052, DA9052_TSI_CONT_A_REG, 1 << 1, 0);

	/* Disable ADC */
	da9052_ts_adc_toggle(tsi, false);

	error = da9052_request_irq(tsi->da9052, DA9052_IRQ_PENDOWN,
				"pendown-irq", da9052_ts_pendwn_irq, tsi);
	if (error) {
		dev_err(tsi->da9052->dev,
			"Failed to register PENDWN IRQ: %d\n", error);
		goto err_free_mem;
	}

	error = da9052_request_irq(tsi->da9052, DA9052_IRQ_TSIREADY,
				"tsiready-irq", da9052_ts_datardy_irq, tsi);
	if (error) {
		dev_err(tsi->da9052->dev,
			"Failed to register TSIRDY IRQ :%d\n", error);
		goto err_free_pendwn_irq;
	}

	/* Mask PEN_DOWN and TSI_READY events */
	da9052_disable_irq(tsi->da9052, DA9052_IRQ_PENDOWN);
	da9052_disable_irq(tsi->da9052, DA9052_IRQ_TSIREADY);

	error = da9052_configure_tsi(tsi);
	if (error)
		goto err_free_datardy_irq;

	error = input_register_device(tsi->dev);
	if (error)
		goto err_free_datardy_irq;

	platform_set_drvdata(pdev, tsi);

	return 0;

err_free_datardy_irq:
	da9052_free_irq(tsi->da9052, DA9052_IRQ_TSIREADY, tsi);
err_free_pendwn_irq:
	da9052_free_irq(tsi->da9052, DA9052_IRQ_PENDOWN, tsi);
err_free_mem:
	kfree(tsi);
	input_free_device(input_dev);

	return error;
}

static int  da9052_ts_remove(struct platform_device *pdev)
{
	struct da9052_tsi *tsi = platform_get_drvdata(pdev);

	da9052_reg_write(tsi->da9052, DA9052_LDO9_REG, 0x19);

	da9052_free_irq(tsi->da9052, DA9052_IRQ_TSIREADY, tsi);
	da9052_free_irq(tsi->da9052, DA9052_IRQ_PENDOWN, tsi);

	input_unregister_device(tsi->dev);
	kfree(tsi);

	return 0;
}

static struct platform_driver da9052_tsi_driver = {
	.probe	= da9052_ts_probe,
	.remove	= da9052_ts_remove,
	.driver	= {
		.name	= "da9052-tsi",
	},
};

module_platform_driver(da9052_tsi_driver);

MODULE_DESCRIPTION("Touchscreen driver for Dialog Semiconductor DA9052");
MODULE_AUTHOR("Anthony Olech <Anthony.Olech@diasemi.com>");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:da9052-tsi");


s",
	},
	"⬜": &emojiMeta{
		Keywords: []string{"shape", "icon", "stone", "button"},
		Name:     "white_large_square",
		Category: "symbols",
	},
	"🔻": &emojiMeta{
		Keywords: []string{"shape", "direction", "bottom"},
		Name:     "small_red_triangle_down",
		Category: "symbols",
	},
	"◼": &emojiMeta{
		Keywords: []string{"shape", "button", "icon"},
		Name:     "black_medium_square",
		Category: "symbols",
	},
	"◻": &emojiMeta{
		Keywords: []string{"shape", "stone", "icon"},
		Name:     "white_medium_square",
		Category: "symbols",
	},
	"◾": &emojiMeta{
		Keywords: []string{"icon", "shape", "button"},
		Name:     "black_medium_small_square",
		Category: "symbols",
	},
	"◽": &emojiMeta{
		Keywords: []string{"shape", "stone", "icon", "button"},
		Name:     "white_medium_small_square",
		Category: "symbols",
	},
	"🔲": &emojiMeta{
		Keywords: []string{"shape", "input", "frame"},
		Name:     "black_square_button",
		Category: "symbols",
	},
	"🔳": &emojiMeta{
		Keywords: []string{"shape", "input"},
		Name:     "white_square_button",
		Category: "symbols",
	},
	"🔈": &emojiMeta{
		Keywords: []string{"sound", "volume", "silence", "broadcast"},
		Name:     "speaker",
		Category: "symbols",
	},
	"🔉": &emojiMeta{
		Keywords: []string{"volume", "speaker", "broadcast"},
		Name:     "sound",
		Category: "symbols",
	},
	"🔊": &emojiMeta{
		Keywords: []string{"volume", "noise", "noisy", "speaker", "broadcast"},
		Name:     "loud_sound",
		Category: "symbols",
	},
	"🔇": &emojiMeta{
		Keywords: []string{"sound", "volume", "silence", "quiet"},
		Name:     "mute",
		Category: "symbols",
	},
	"📣": &emojiMeta{
		Keywords: []string{"sound", "speaker", "volume"},
		Name:     "mega",
		Category: "symbols",
	},
	"📢": &emojiMeta{
		Keywords: []string{"volume", "sound"},
		Name:     "loudspeaker",
		Category: "symbols",
	},
	"🔔": &emojiMeta{
		Keywords: []string{"sound", "notification", "christmas", "xmas", "chime"},
		Name:     "bell",
		Category: "symbols",
	},
	"🔕": &emojiMeta{
		Keywords: []string{"sound", "volume", "mute", "quiet", "silent"},
		Name:     "no_bell",
		Category: "symbols",
	},
	"🃏": &emojiMeta{
		Keywords: []string{"poker", "cards", "game", "play", "magic"},
		Name:     "black_joker",
		Category: "symbols",
	},
	"🀄": &emojiMeta{
		Keywords: []string{"game", "play", "chinese", "kanji"},
		Name:     "mahjong",
		Category: "symbols",
	},
	"♠": &emojiMeta{
		Keywords: []string{"poker", "cards", "suits", "magic"},
		Name:     "


List) {
                if (entity !is EntityPlayer) continue
                if (entity == player) continue
                if (!isBot(entity)) continue
                cacheSet.add(entity)
            }
            botSet.removeIf { !cacheSet.contains(it) }
            botSet.addAll(cacheSet)
        }
    }

    fun isBot(entity: Entity) = isEnabled && entity is EntityPlayer && botSet.contains(entity)

    private fun SafeClientEvent.isBot(entity: EntityPlayer) = entity.name == player.name
        || entity.name == FakePlayer.playerName
        || tabList.value && connection.getPlayerInfo(entity.name) == null
        || ping.value && connection.getPlayerInfo(entity.name)?.responseTime ?: -1 <= 0
        || hp.value && entity.health !in 0f..20f
        || sleeping.value && entity.isPlayerSleeping && !entity.onGround
        || hoverOnTop.value && hoverCheck(entity)
        || entity.ticksExisted < ticksExists.value

    private fun SafeClientEvent.hoverCheck(entity: EntityPlayer): Boolean {
        val distXZ = Vec2d(entity.posX, entity.posZ).minus(player.posX, player.posZ).lengthSquared()
        return distXZ < 16 && entity.posY - player.posY > 2.0 && abs(entity.posY - entity.prevPosY) < 0.1
    }
}
package org.kamiblue.client.module.modules.combat

import net.minecraft.init.Items
import net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock
import net.minecraft.util.EnumHand
import net.minecraft.util.math.AxisAlignedBB
import net.minecraft.util.math.BlockPos
import net.minecraftforge.fml.common.gameevent.TickEvent
import org.kamiblue.client.event.SafeClientEvent
import org.kamiblue.client.event.events.PacketEvent
import org.kamiblue.client.event.events.RenderOverlayEvent
import org.kamiblue.client.event.events.RenderWorldEvent
import org.kamiblue.client.manager.managers.CombatManager
import org.kamiblue.client.manager.managers.HotbarManager.serverSideItem
import org.kamiblue.client.module.Category
import org.kamiblue.client.module.Module
import org.kamiblue.client.util.Quad
import org.kamiblue.client.util.color.ColorHolder
import org.kamiblue.client.util.combat.CrystalUtils.canPlaceCollide
import org.kamiblue.client.util.graphics.ESPRenderer
import org.kamiblue.client.util.graphics.GlStateUtils
import org.kamiblue.client.util.graphics.KamiTessellator
import org.kamiblue.client.util.graphics.ProjectionUtils
import org.kamiblue.client.util.graphics.font.FontRenderAdapter
import org.kamiblue.client.util.math.VectorUtils.toVec3dCenter
import org.kamiblue.client.util.threads.safeListener
import org.kamiblue.commons.utils.MathUtils
import org.kamiblue.event.listener.listener
import org.lwjgl.opengl.GL11.*
import kotlin.math.PI
import kotlin.math.abs
import kotlin.math.min
import kotlin.math.sin

internal object CrystalESP : Module(
    name = "CrystalESP",
    description = "Renders ESP for End Crystals",
    category = Category.COMBAT
) {
    private val page = setting("Page", Page.DAMAGE_ESP)

    private val damageESP = setting("Damage ESP", false, { page.value == Page.DAMAGE_ESP })
    private val minAlpha = setting("Min Alpha", 0, 0..25


lag, null);
          /* project onto solar system equator */
        else if ((swed.sidd.sid_mode & SweConst.SE_SIDBIT_SSY_PLANE) != 0)
  	  swi_trop_ra2sid_lon_sosy(x, ndp.xreturn, 6, ndp.xreturn, 18, iflag, null);
        /* to polar */
        sl.swi_cartpol_sp(ndp.xreturn, 6, ndp.xreturn, 0);
        sl.swi_cartpol_sp(ndp.xreturn, 18, ndp.xreturn, 12);
      } else {
      /* traditional algorithm */
        sl.swi_cartpol_sp(ndp.xreturn, 6, ndp.xreturn, 0);
        ndp.xreturn[0] -= swe_get_ayanamsa(ndp.teval) * SwissData.DEGTORAD;
        sl.swi_polcart_sp(ndp.xreturn, 0, ndp.xreturn, 6);
        sl.swi_cartpol_sp(ndp.xreturn, 18, ndp.xreturn, 12);
      }
    } else if ((iflag & SweConst.SEFLG_J2000) != 0) {
      /* node and apogee are referred to t;
       * the ecliptic position must be transformed to J2000 */
      for (i = 0; i <= 5; i++)
        x[i] = ndp.xreturn[18+i];
      /* precess to J2000 */
      sl.swi_precess(x, tjd, iflag, SwephData.J_TO_J2000);
      if ((iflag & SweConst.SEFLG_SPEED) != 0)
        swi_precess_speed(x, tjd, iflag, SwephData.J_TO_J2000);
      for (i = 0; i <= 5; i++)
        ndp.xreturn[18+i] = x[i];
      sl.swi_cartpol_sp(ndp.xreturn, 18, ndp.xreturn, 12);
      sl.swi_coortrf2(ndp.xreturn, 18, ndp.xreturn, 6, swed.oec2000.seps, swed.oec2000.ceps);
      if ((iflag & SweConst.SEFLG_SPEED) != 0)
        sl.swi_coortrf2(ndp.xreturn, 21, ndp.xreturn, 9, swed.oec2000.seps, swed.oec2000.ceps);
      sl.swi_cartpol_sp(ndp.xreturn, 6, ndp.xreturn, 0);
    } else {
      /* tropical ecliptic positions */
      /* precession has already been taken into account, but not nutation */
      if ((iflag & SweConst.SEFLG_NONUT) == 0) {
        swi_nutate(ndp.xreturn, 18, iflag, false);
      }
      /* equatorial polar */
      sl.swi_cartpol_sp(ndp.xreturn, 18, ndp.xreturn, 12);
      /* ecliptic cartesian */
      sl.swi_coortrf2(ndp.xreturn, 18, ndp.xreturn, 6, oe.seps, oe.ceps);
      if ((iflag & SweConst.SEFLG_SPEED) != 0)
        sl.swi_coortrf2(ndp.xreturn, 21, ndp.xreturn, 9, oe.seps, oe.ceps);
      if ((iflag & SweConst.SEFLG_NONUT) == 0) {
        sl.swi_coortrf2(ndp.xreturn, 6, ndp.xreturn, 6, nut.snut, nut.cnut);
        if ((iflag & SweConst.SEFLG_SPEED) != 0)
  	sl.swi_coortrf2(ndp.xreturn, 9, ndp.xreturn, 9, nut.snut, nut.cnut);


id CommitFrame(Texture texture, long timestamp)
        {
            RenderTexture renderTexture = RenderTexture.GetTemporary(_renderTextureDescriptor);
            Graphics.Blit(texture, renderTexture);

            AsyncGPUReadback.Request(renderTexture, 0, TextureFormat.RGBA32, request =>
            {
                if (m_IsReady)
                {
                    _mediaRecorder.CommitFrame(request.GetData<byte>(), timestamp);
                }
            });

            RenderTexture.ReleaseTemporary(renderTexture);
        }

        public override void Dispose()
        {
            m_IsReady = false;
            base.Dispose();
        }
    }
}


d = a+a1, b+b1, c+c1, d+d1
      }

      var result [16]byte
      binary.LittleEndian.PutUint32(result[0:4], a)
      binary.LittleEndian.PutUint32(result[4:8], b)
      binary.LittleEndian.PutUint32(result[8:12], c)
      binary.LittleEndian.PutUint32(result[12:16], d)
      return fmt.Sprintf("%x", result)
  }

  func main() {
      data := "spiderapi.cn - 虫术"
      resultLowercase32bit := md5Hash(data)
      resultUppercase32bit := strings.ToUpper(resultLowercase32bit)
      resultLowercase16bit := resultLowercase32bit[8:24]
      resultUppercase16bit := strings.ToUpper(resultLowercase16bit)
      fmt.Println("32 位小写值: ", resultLowercase32bit)
      fmt.Println("32 位大写值: ", resultUppercase32bit)
      fmt.Println("16 位小写值: ", resultLowercase16bit)
      fmt.Println("16 位大写值: ", resultUppercase16bit)
  }
  ```

## 主要特征

MD5 的 hash 值具有明显的特征，实现该算法的源代码里也有一些固定的特征值，没有这些特定值，就无法实现 MD5，我们可以通过密文特征和搜索源码特征值来快速判断是否为 MD5 算法。

密文特征：

- 密文一般为 **16 位**或者 **32 位**，其中 16 位是取的 32 位第 9~25 位的值；
- 组成方式为字母（**a-f**）和数字（**0-9**）混合，字母可以全部是大写或者小写。

源码特征值：

- `0123456789ABCDEF`、`0123456789abcdef`
- `1732584193`、`-271733879`、`-1732584194`、`271733878`
- `0x67452301`、`0xefcdab89`、`0x98badcfe`、`0x10325476`

PS：某些特殊情况下，密文的长度也有可能不止 16 位或者 32 位，有可能是在官方算法上有一些魔改，通常也是在 16 位的基础上，左右填充了一些随机字符串。

示例：

| 编码类型   | 示例一                                | 示例二                                |
|:-------|:-----------------------------------|------------------------------------|
| 明文     | 01234567890                        | administrators                     |
| 32 位小写 | `ebe596017db2f8c69136e5d6e594d365` | `d04952b3df94d47c04fc2dc28396a62d` |
| 32 位大写 | `EBE596017DB2F8C69136E5D6E594D365` | `D04952B3DF94D47C04FC2DC28396A62D` |


">
Property Detail

name
	property

name:String  [read-only]

Language Version: 	ActionScript 3.0

Product Version: 	Adobe Digital Enterprise Platform Experience Services - Client Component Framework 10

Runtime Versions: 	AIR 1.1, Flash Player 9

		 The name of the operation, as specified to the startOperation method of the IProgressService service.

 Implementation
    public function get name():String

 © 2015 Adobe Systems Incorporated. All rights reserved.
Thu Dec 6 2018, 01:12 PM -08:00

[an error occurred while processing this directive]

Legal Notices | Online Privacy Policy


Mask;

  /** Where the sign bits will be */
  private final long mUpperMask;

  /** actual sign bit */
  private final long mSignBit;

  /** Number of bit-fields packed into each long */
  private final int mNumFields;

  /** The number of bits used to access the fields within each long. */
  private final int mFieldIndexBits;

  /**
   * The type of array to use inside the index
   */
  public enum IndexType {
    /** Choose chunked or single based on the length */
    DEFAULT,
    /** Use an array of arrays */
    CHUNKED,
    /** Use a single array */
    SINGLE
  }

  /**
   * @param length number of items.
   * @param bits number of bits to be stored in each item.
   * @exception NegativeArraySizeException if length less than 0
   */
  public BitIndex(final long length, final int bits) {
    super(length);
    if (bits < 1) {
      throw new IllegalArgumentException("Illegal range value=" + bits);
    }
    mBits = roundUpBits(bits);
    mBitsShift = MathUtils.ceilPowerOf2Bits(mBits - 1);
    assert mBits == (1 << mBitsShift);
    assert 5 * mBits == (5 << mBitsShift);

    mMask = MathUtils.round(Math.pow(2, mBits)) - 1;
    // because we have rounded up mBits to a power of 2, mNumFields will be a power of two.
    mNumFields = 64 / mBits;
    assert mNumFields == roundUpBits(mNumFields);
    mFieldIndexBits = MathUtils.ceilPowerOf2Bits(mNumFields - 1);
    //System.err.println("fieldIndexBits=" + mFieldIndexBits);
    assert mNumFields == (1 << mFieldIndexBits);
    final long llen = length / mNumFields + 1;

    // always use LongChunks, otherwise the JIT gets confused.
    mArray = new com.rtg.util.array.longindex.LongChunks(llen);
    // since we always use long chunks, we may as well be extensible
    mSignBit = (mMask + 1) >>> 1;
    mUpperMask = ~mMask;
    assert globalIntegrity();
  }

  @Override
  public long extendBy(long length) {
    final long targetLength = mLength + length;
    final long llen = targetLength / mNumFields + 1;
    final long innerExtend = llen - mArray.length();
    mArray.extendBy(innerExtend);
    final long res = mLength;
    mLength = targetLength;
    return res;
  }

  @Override
  public void trim(long length) {
    final long llen = length / mNumFields + 1;
    mArray.trim(llen);
    mLength = length;
  }

  @Override
  public long getSigned(long offset) {
    final long val = get(offset);
    if ((val & mSignBit) != 0) {
      return val | mUpperMask;
    }
    return val;
  }

  @Override
  public void setSigned(long offset, long value) {
    assert ((value >= 0 ? value : -value) & mUpperMask) == 0L : value;
    set(offset, value & mMask);
  }

  /**
   * Round up a number to the next power of 2.
   *
   * @param bits 1..64
   * @return the smallest power of 2 that is greater than or equal to bits.
   */
  public static int roundUpBits(final int bits) {
    return 1 << MathUtils.ceilPowerOf2Bits(bits - 1);
  }

  /**
   * @return the number of bytes consumed.
   */
  @Override
  public long bytes() {
    return mArray.bytes();
  }

  /**
   * Get the number of bits that each value is packed into.
   * @return an integer from 1 to 31.
   */
  public int getBits() {
    return mBits;
  }

  @Override
  public boolean integrity() {
    super.integrity();
    Exam.assertTrue(1 <= mBits && mBits <= 64);
    Exam.assertTrue("mBits=" + mBits, mBits == 1 || mBits == 2 || mBits == 4 || mBits == 8 || mBits == 16 || mBits == 32 || mBits == 64);
    return true;
  }

  /**
   * Get the


UpWebResourceMap() {
//        getWebResourceMap().put("Rgaa22.Test.7.4-1Passed-01",
//              getWebResourceFactory().createPage(
//              getTestcasesFilePath() + "rgaa22/Rgaa22Rule07041/RGAA22.Test.7.4-1Passed-01.html"));
//        getWebResourceMap().put("Rgaa22.Test.7.4-2Failed-01",
//              getWebResourceFactory().createPage(
//              getTestcasesFilePath() + "rgaa22/Rgaa22Rule07041/RGAA22.Test.7.4-2Failed-01.html"));
//        getWebResourceMap().put("Rgaa22.Test.7.4-3NMI-01",
//                getWebResourceFactory().createPage(
//                getTestcasesFilePath() + "rgaa22/Rgaa22Rule07041/RGAA22.Test.7.4-3NMI-01.html"));
//        getWebResourceMap().put("Rgaa22.Test.7.4-4NA-01",
//              getWebResourceFactory().createPage(
//              getTestcasesFilePath() + "rgaa22/Rgaa22Rule07041/RGAA22.Test.7.4-4NA-01.html"));
        getWebResourceMap().put("Rgaa22.Test.7.4-5NT-01",
                getWebResourceFactory().createPage(
                getTestcasesFilePath() + "rgaa22/Rgaa22Rule07041/RGAA22.Test.7.4-5NT-01.html"));
    }

    @Override
    protected void setProcess() {
//        assertEquals(TestSolution.PASSED,
//                processPageTest("Rgaa22.Test.7.4-1Passed-01").getValue());
//        assertEquals(TestSolution.FAILED,
//                processPageTest("Rgaa22.Test.7.4-2Failed-01").getValue());
//        assertEquals(TestSolution.NEED_MORE_INFO,
//                processPageTest("Rgaa22.Test.7.4-3NMI-01").getValue());
//        assertEquals(TestSolution.NOT_APPLICABLE,
//                processPageTest("Rgaa22.Test.7.4-4NA-01").getValue());
        assertEquals(TestSolution.NOT_TESTED,
                processPageTest("Rgaa22.Test.7.4-5NT-01").getValue());
    }

    @Override
    protected void setConsolidate() {
//        assertEquals(TestSolution.PASSED,
//                consolidate("Rgaa22.Test.7.4-1Passed-01").getValue());
//        assertEquals(TestSolution.FAILED,
//                consolidate("Rgaa22.Test.7.4-2Failed-01").getValue());
//        assertEquals(TestSolution.NEED_MORE_INFO,
//                consolidate("Rgaa22.Test.7.4-3NMI-01").getValue());
//        assertEquals(TestSolution.NOT_APPLICABLE,
//                consolidate("Rgaa22.Test.7.4-4NA-01").getValue());
        assertEquals(TestSolution.NOT_TESTED,
                consolidate("Rgaa22.Test.7.4-5NT-01").getValue());
    }

}/*
 * Tanaguru - Automated webpage assessment
 * Copyright (C) 2008-2015  Tanaguru.org
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this p


// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation and
// any modifications thereto. Any use, reproduction, disclosure, or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA Corporation is strictly prohibited.
//
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Information and code furnished is believed to be accurate and reliable.
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
// information or for any infringement of patents or other rights of third parties that may
// result from its use. No license is granted by implication or otherwise under any patent
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
// This code supersedes and replaces all information previously supplied.
// NVIDIA Corporation products are not authorized for use as critical
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.

#ifndef GU_BV_CONSTANTS_H
#define GU_BV_CONSTANTS_H

#include "PsVecMath.h"

namespace
{
	const physx::Ps::aos::VecU32V signMask = physx::Ps::aos::U4LoadXYZW((physx::PxU32(1)<<31), (physx::PxU32(1)<<31), (physx::PxU32(1)<<31), (physx::PxU32(1)<<31));
	const physx::Ps::aos::Vec4V epsFloat4 = physx::Ps::aos::V4Load(1e-9f);
	const physx::Ps::aos::Vec4V zeroes = physx::Ps::aos::V4Zero();
	const physx::Ps::aos::Vec4V twos = physx::Ps::aos::V4Load(2.0f);
	const physx::Ps::aos::Vec4V epsInflateFloat4 = physx::Ps::aos::V4Load(1e-7f);
}

#endif // GU_BV_CONSTANTS_H


schema::versions;
    use diesel::update;

    #[derive(Deserialize)]
    struct R {
        versions: Vec<EncodableVersion>,
        meta: Meta,
    }
    #[derive(Deserialize)]
    struct Meta {
        more: bool,
    }

    let (app, _, user) = TestApp::init().with_user();
    let user_model = user.as_model();
    let user_id = user_model.id;
    app.db(|conn| {
        CrateBuilder::new("foo_fighters", user_id)
            .version(VersionBuilder::new("1.0.0"))
            .expect_build(conn);

        // Make foo_fighters's version mimic a version published before we started recording who
        // published versions
        let none: Option<i32> = None;
        update(versions::table)
            .set(versions::published_by.eq(none))
            .execute(conn)
            .unwrap();

        CrateBuilder::new("bar_fighters", user_id)
            .version(VersionBuilder::new("1.0.0"))
            .expect_build(conn);
    });

    let r: R = user.get("/api/v1/me/updates").good();
    assert_eq!(r.versions.len(), 0);
    assert_eq!(r.meta.more, false);

    user.put::<OkBool>("/api/v1/crates/foo_fighters/follow", b"")
        .good();
    user.put::<OkBool>("/api/v1/crates/bar_fighters/follow", b"")
        .good();

    let r: R = user.get("/api/v1/me/updates").good();
    assert_eq!(r.versions.len(), 2);
    assert_eq!(r.meta.more, false);
    let foo_version = r
        .versions
        .iter()
        .find(|v| v.krate == "foo_fighters")
        .unwrap();
    assert!(foo_version.published_by.is_none());
    let bar_version = r
        .versions
        .iter()
        .find(|v| v.krate == "bar_fighters")
        .unwrap();
    assert_eq!(
        bar_version.published_by.as_ref().unwrap().login,
        user_model.gh_login
    );

    let r: R = user
        .get_with_query("/api/v1/me/updates", "per_page=1")
        .good();
    assert_eq!(r.versions.len(), 1);
    assert_eq!(r.meta.more, true);

    user.delete::<OkBool>("/api/v1/crates/bar_fighters/follow")
        .good();
    let r: R = user
        .get_with_query("/api/v1/me/updates", "page=2&per_page=1")
        .good();
    assert_eq!(r.versions.len(), 0);
    assert_eq!(r.meta.more, false);

    user.get_with_query::<()>("/api/v1/me/updates", "page=0")
        .bad_with_status(StatusCode::BAD_REQUEST);
}

#[test]
fn user_total_downloads() {
    use diesel::update;

    let (app, anon, user) = TestApp::init().with_user();
    let user = user.as_model();
    let another_user = app.db_new_user("bar");
    let another_user = another_user.as_model();

    app.db(|conn| {
        let mut krate = CrateBuilder::new("foo_krate1", user.id).expect_build(conn);
        krate.downloads = 10;
        update(&krate).set(&krate).execute(conn).unwrap();

        let mut krate2 = CrateBuilder::new("foo_krate2", user.id).expect_build(conn);
        krate2.downloads = 20;
        update(&krate2).set(&krate2).execute(conn).unwrap();

        let mut another_krate = CrateBuilder::new("bar_krat


#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
Date: 2021/8/2 16:47
Desc:
"""


, 'b> IntoFontCollection for &'a [&'b str] {
    #[inline]
    fn into_font_collection(self, context: &CanvasFontContext) -> Arc<FontCollection> {
        let mut font_collection = FontCollection::new();
        for postscript_name in self {
            let font = context.get_font_by_postscript_name(postscript_name);
            font_collection.add_family(FontFamily::new_from_font(font));
        }
        Arc::new(font_collection)
    }
}
use alloc::rc::Rc;
use alloc::sync::Arc;

use super::{Cursor, CursorPtr, Detached, Handle, HandleMut};

impl<T> Cursor<T> for Rc<T> {
    fn as_ptr(&self) -> CursorPtr<T> {
        let ptr = &**self as *const T;
        // Safe because Rc guarantees its pointer is non-null
        unsafe { CursorPtr::new_unchecked(ptr as _) }
    }
}

unsafe impl<T> Detached<T> for Rc<T> {}

unsafe impl<'a, T: 'a> Handle<'a, T> for Rc<T> {
    type Guard = &'a T;

    fn lock_ref(&'a self) -> Self::Guard {
        &*self
    }
}

unsafe impl<'a, T: 'a> HandleMut<'a, T> for Rc<T> {
    type GuardMut = &'a mut T;

    fn lock_mut(&'a mut self) -> Self::GuardMut {
        Rc::get_mut(self).expect("other Rc references exist")
    }
}

impl<T> Cursor<T> for Arc<T> {
    fn as_ptr(&self) -> CursorPtr<T> {
        let ptr = &**self as *const T;
        // Safe because Arc guarantees its pointer is non-null
        unsafe { CursorPtr::new_unchecked(ptr as _) }
    }
}

unsafe impl<T> Detached<T> for Arc<T> {}

unsafe impl<'a, T: 'a> Handle<'a, T> for Arc<T> {
    type Guard = &'a T;

    fn lock_ref(&'a self) -> Self::Guard {
        &*self
    }
}
<filename>src/mask.rs
use alloc::vec::Vec;

use crate::{hash, Error, Hash};

/// Mask Generation Function 1 from RFC8017 Appendix B
///
/// Outputs the mask of mask_len bytes using the input seed
///
/// Returns error if mask_len > 2**32 * Hash Digest Length
pub fn mgf1(seed: &[u8], mask_len: usize, hash: Hash) -> Result<Vec<u8>, Error> {
    let hash_len = hash::hash_len(hash)?;
    // 1. If mask_len > 2**32 * hLen, output "mask too long"
    if mask_len > 0x1_0000_0000 * hash_len {
        return Err(Error::InvalidMaskLength);
    }

    // prepare input for step 3B
    let seed_len = seed.len();
    let mut input = seed.to_vec();
    // add room for C encoding
    input.extend_from_slice([0_u8; 4].as_ref());

    let lim = (mask_len as f64 / hash_len as f64).ceil() as usize;
    // 2. Let T be the empty octet string
    let mut t: Vec<u8> = Vec::with_capacity(lim * hash_len);

    // 3. For counter from 0 to ceil(mask_len / hLen) - 1
    for i in 0..lim {
        // 3A. Convert counter to an octet string C of length 4 octets
        let c = (i as u32).to_be_bytes();
        // 3B. Concatenate the hash of the seed and C to the octet string T
        input[seed_len..].copy_from_slice(c.as_ref());
        t.extend_from_slice(&hash::digest(&input, hash)?);
    }

    // 4. Output the leading mask_len octets of T
    Ok(t[..mask_len].to_vec())
}
<gh_stars>0
use std::error::Error;
use std::thread::current;

use crate::lib::lexer::Token;
use crate::lib::parser::Parser;
use crate::lib::{ParsingError,


n False

    def rotate_key(self, old_key_id: str) -> Optional[Tuple[str, bytes]]:
        """
        Rotate an encryption key
        Returns (new_key_id, new_key) or None if rotation fails
        """
        try:
            if old_key_id not in self._keys:
                self.logger.log_system_event("key_rotation_error",
                    {"error": "Invalid key ID", "key_id": old_key_id})
                return None

            # Generate new key
            new_key_id, new_key = self.generate_key()

            # Securely delete old key
            self.delete_key(old_key_id)

            return new_key_id, new_key

        except Exception as e:
            self.logger.log_system_event("key_rotation_error", {"error": str(e)})
            return None


tofill-inspect-id="208a2cb1-8f08-4fa5-8bc9-352c373355af" srcdoc="<html><head></head><body><iframe height=&quot;0&quot; width=&quot;0&quot; style=&quot;display: none; visibility: hidden;&quot; src=&quot;https://www.googletagmanager.com/static/service_worker/5840/sw_iframe.html?origin=https%3A%2F%2Fwww.zalando.pl&quot; data-moz-autofill-inspect-id=&quot;07be1893-29fd-49a1-83f0-d7749379d1a2&quot;></iframe></body></html>">

<meta charset=utf-8><meta content="default-src 'none'; img-src data:; media-src data:; style-src data: 'unsafe-inline'; font-src data:; frame-src 'self' data:"http-equiv=Content-Security-Policy><meta content="Wed, 25 Jun 2025 13:49:27 GMT"http-equiv=Memento-Datetime><link href="https://www.calvinklein.us/en/checkout?stage=payment#payment"rel=original><meta content="ie=edge"http-equiv=x-ua-compatible><meta content="width=device-width,initial-scale=1"name=viewport><title>Calvin Klein® USA</title><meta content="telephone=no"name=format-detection><meta content="Calvin Klein® USA offers modern, sophisticated styles for women and men including apparel, handbags, footwear, underwear, fragrance and home furnishings with free shipping available."name=description><meta content="Calvin Klein"name=keywords><meta content=https://media1.calvinklein.com/images/static/e-comm17-7/ogDefault.jpg property=og:image><meta content=400 property=og:image:width><meta content=website property=og:type><meta content=summary property=twitter:card><meta content="Calvin Klein® USA | Official Online Site & Store"property=twitter:title><meta content="Calvin Klein"property=og:site_name><meta content="https://www.calvinklein.us/en/checkout?stage=payment"property=twitter:url><meta content=400 property=og:image:height><meta content=""property=og:description><meta content=https://media1.calvinklein.com/images/ck-logo.png property=twitter:image><meta content="Calvin Klein


Sk.builtin.int_(27);\n    mod.DELETE = new Sk.builtin.int_(127);\n    mod.CODED = new Sk.builtin.int_(0xffff);\n\n    // p.key will be CODED and p.keyCode will be this value\n    mod.SHIFT = new Sk.builtin.int_(16);\n    mod.CONTROL = new Sk.builtin.int_(17);\n    mod.ALT = new Sk.builtin.int_(18);\n    mod.CAPSLK = new Sk.builtin.int_(20);\n    mod.PGUP = new Sk.builtin.int_(33);\n    mod.PGDN = new Sk.builtin.int_(34);\n    mod.END = new Sk.builtin.int_(35);\n    mod.HOME = new Sk.builtin.int_(36);\n    mod.LEFT = new Sk.builtin.int_(37);\n    mod.UP = new Sk.builtin.int_(38);\n    mod.RIGHT = new Sk.builtin.int_(39);\n    mod.DOWN = new Sk.builtin.int_(40);\n    mod.F1 = new Sk.builtin.int_(112);\n    mod.F2 = new Sk.builtin.int_(113);\n    mod.F3 = new Sk.builtin.int_(114);\n    mod.F4 = new Sk.builtin.int_(115);\n    mod.F5 = new Sk.builtin.int_(116);\n    mod.F6 = new Sk.builtin.int_(117);\n    mod.F7 = new Sk.builtin.int_(118);\n    mod.F8 = new Sk.builtin.int_(119);\n    mod.F9 = new Sk.builtin.int_(120);\n    mod.F10 = new Sk.builtin.int_(121);\n    mod.F11 = new Sk.builtin.int_(122);\n    mod.F12 = new Sk.builtin.int_(123);\n    mod.NUMLK = new Sk.builtin.int_(144);\n    mod.META = new Sk.builtin.int_(157);\n    mod.INSERT = new Sk.builtin.int_(155);\n\n    // PJS defined constants\n    mod.SINCOS_LENGTH = new Sk.builtin.int_(720);\n    mod.PRECISIONB = new Sk.builtin.int_(15);\n    mod.PRECISIONF = new Sk.builtin.int_(1 << 15);\n    mod.PREC_MAXVAL = new Sk.builtin.int_((1 << 15) - 1);\n    mod.PREC_ALPHA_SHIFT = new Sk.builtin.int_(24 - 15);\n    mod.PREC_RED_SHIFT = new Sk.builtin.int_(16 - 15);\n    mod.NORMAL_MODE_AUTO = new Sk.builtin.int_(0);\n    mod.NORMAL_MODE_SHAPE = new Sk.builtin.int_(1);\n    mod.NORMAL_MODE_VERTEX = new Sk.builtin.int_(2);\n    mod.MAX_LIGHTS = new Sk.builtin.int_(8);\n\n    // 2D - Primitives\n    mod.line = new Sk.builtin.func(function (x1, y1, x2, y2) {\n        mod.processing.line(x1.v, y1.v, x2.v, y2.v);\n    });\n\n    mod.ellipse = new Sk.builtin.func(function (x, y, r1, r2) {\n        mod.processing.ellipse(x.v, y.v, r1.v, r2.v);\n\n    });\n\n    mod.text = new Sk.builtin.func(function (theText, x, y) {\n        mod.processing.text(theText.v, x.v, y.v);\n    });\n\n    mod.point = new Sk.builtin.func(function (x1, y1) {\n        mod.processing.point(x1.v, y1.v);\n    });\n\n    mod.arc = new Sk.builtin.func(function (x, y, width, height, start,


确认当前python版本是否为python3.7
2. 执行``pip install celery``和``pip install gunicorn``检查celery和gunicorn是否已经安装
3. 如果已经安装，可以执行以下命令建立软链：（注：需要将``/usr/local/python3``调整为本地实际的Python3安装路径）

```bash
ln -s /usr/local/python3/bin/gunicorn /usr/local/bin/gunicorn
ln -s /usr/local/python3/bin/celery /usr/local/bin/celery
```

### 2. 服务启动与初始化

#### 2.1 服务占用端口异常

TCA 本地部署启动后，会监听多个端口：

- web服务：80
- nginx服务：8000
- main服务：8001
- analysis服务：8002
- login服务：8003
- file-nginx服务：8004
- file服务：8804
- scmproxy服务：8009

如果出现端口占用冲突，建议采用以下方式解决：

1. 调整其他程序监听的端口号，避免跟上述TCA服务的端口号出现冲突
2. 采用Docker-Compose方式启动TCA，仅监听80端口

不推荐调整TCA指定服务的端口号，需要调整多处配置，以及可能会影响到后续服务的升级

#### 2.2 服务输出日志找不到

本地部署输出的日志位置：

1. ``main``服务输出的日志目录：``server/projects/main/log``
    - 服务启动日志：``server/projects/main/log/gunicorn_error.log``
    - 服务接收请求日志：``server/projects/main/log/gunicorn_access.log``
    - Celery Worker启动日志（处理异步任务）：``server/projects/main/nohup_worker.out``
    - Celery Beat启动日志（启动定时任务）：``server/projects/main/nohup_beat.out``
    - 服务运行日志：``server/projects/main/log/codedog.log``
    - Celery Worker运行日志：``server/projects/main/log/main_celery.log``
    - Celery Beat运行日志：``server/projects/main/log/main_beat.log``
2. ``analysis``服务输出的日志目录：``server/projects/analysis/log``
    - 服务启动日志：``server/projects/analysis/log/gunicorn_error.log``
    - Celery Worker启动日志：``server/projects/analysis/nohup.out``
    - 服务接收请求日志：``server/projects/analysis/log/gunicorn_access.log``
    - 服务运行日志：``server/projects/analysis/log/codedog.log``
    - Celery Worker运行日志（处理结果入库）：``server/projects/analysis/log/celery.log``
3. ``login``服务输出的日志目录：``server/projects/login/log``
    - 服务启动日志：``server/projects/login/log/gunicorn_error.log``


ad_of_node;
        if (head_of_node == null) {
            System.out.println("Your list is empty");
        }
        else {
            do {
                System.out.print(" " + current.data);
                current = current.next;
            } while (current != head_of_node);
            System.out.println();
        }
    }

    // Driver code
    public static void main(String[] args)
    {

        GFG circular_list = new GFG();
        circular_list.add(10);
        circular_list.add(6);
        circular_list.add(3);
        circular_list.add(8);
        circular_list.add(4);

        System.out.print("Original List -->     ");
        circular_list.Print_List();
        circular_list.Sort_List();
        System.out.print("List after Sorting--> ");
        circular_list.Print_List();
    }
}
```

**Output**

```
Original List -->      10 6 3 8 4
List after Sorting-->  3 4 6 8 10
```

**时间复杂度:** O(N <sup>2</sup> )# 在给定的索引范围内对数组进行排序

> 原文:[https://www . geeksforgeeks . org/给定索引范围内的排序数组/](https://www.geeksforgeeks.org/sort-the-array-in-a-given-index-range/)

给定一个由 **N** 个整数组成的数组**arr【】**和一个索引范围**【a，b】**。任务是在给定的索引范围内对数组进行排序，即将数组中的元素从**arr【a】**排序到**arr【b】**，同时保持其他元素的位置不变，并打印修改后的数组。
**注:**a 和 **b** 之间没有关系，即 **a** 可以小于、等于或大于 **b** 。另外， **0 ≤ a，b < N**

**示例:**

> **输入:** arr[] = {7，8，4，5，2}，a = 1，b = 4
> **输出:** 7 2 4 5 8
> 对于索引范围【1，4】我们得到元素 8，4，5 和 2
> 在对这些元素进行排序时，我们得到 2，4，5 和 8。
> 所以数组修改为{7，2，4，5，8}
>
> **输入:** arr[] = {20，10，3，8}，a = 3，b = 1
> **输出:** 20 3 8 10

**进场:**

1.  为数组的给定索引范围创建元素的临时数组。
2.  对这个临时数组进行排序。
3.  现在用给定索引范围的临时数组的这些排序元素修改原始数组。

下面是上述方法的实现:

## C++

```
// C++ program to sort the
// array in a given index range

#include <bits/stdc++.h>
using namespace std;

// Function to sort the elements of the array
// from index a to index b
void partSort(int arr[], int N, int a, int b)
{
    // Variables to store start and
    // end of the index range
    int l = min(a, b);
    int r = max(a, b);

    // Temporary array
    int temp[r - l + 1];
    int j = 0;
    for (int i = l; i <= r; i++) {
        temp[j] = arr[i];
        j++;
    }

    // Sort the temporary array
    sort(temp, temp + r - l + 1);

    // Modifying original array with
    // temporary array elements
    j = 0;


xb1, %xmm1, %xmm1
	movss		%xmm4, (out0)
	movss		%xmm4, (out1)
	leaq		(out1,%rax,1), out1
	movss		%xmm0, (out1)
	movss		%xmm5, (out1,%rax,1)
	movss		%xmm1, (out1,%rax,2)
	leaq		(out1,%rax,4), out1
	movhlps		%xmm4, %xmm4
	movhlps		%xmm0, %xmm0
	movhlps		%xmm5, %xmm5
	movhlps		%xmm1, %xmm1
	movss		%xmm4, -128(out1)
	movss		%xmm0, (out1)
	movss		%xmm5, (out1,%rax,1)
	movss		%xmm1, (out1,%rax,2)

	leaq		-64(out0,%rax,8), out0
	negq		%rax
	vshufps		$0x1e, %xmm6, %xmm6, %xmm0
	vblendps	$0x7, %xmm0, %xmm8, %xmm0
	addps		%xmm2, %xmm6
	addps		%xmm7, %xmm2
	addps		%xmm3, %xmm7
	addps		%xmm0, %xmm3
	movss		%xmm6, (out0)
	movss		%xmm2, (out0,%rax,1)
	movss		%xmm7, (out0,%rax,2)
	movss		%xmm3, -128(out0,%rax,2)
	leaq		(out0,%rax,4), out0
	movhlps		%xmm6, %xmm0
	movhlps		%xmm2, %xmm1
	movhlps		%xmm7, %xmm4
	movhlps		%xmm3, %xmm5
	movss		%xmm0, (out0)
	movss		%xmm1, (out0,%rax,1)
	movss		%xmm4, (out0,%rax,2)
	movss		%xmm5, -128(out0,%rax,2)
	leaq		64(out1,%rax,4), out1
	negq		%rax
	shufps		$0xb1, %xmm6, %xmm6
	shufps		$0xb1, %xmm2, %xmm2
	shufps		$0xb1, %xmm7, %xmm7
	shufps		$0xb1, %xmm3, %xmm3
	movss		%xmm6, -128(out1)
	movss		%xmm2, (out1)
	movss		%xmm7, (out1,%rax,1)
	movss		%xmm3, (out1,%rax,2)
	leaq		(out1,%rax,4), out1
	movhlps		%xmm6, %xmm6
	movhlps		%xmm2, %xmm2
	movhlps		%xmm7, %xmm7
	movhlps		%xmm3, %xmm3
	movss		%xmm6, -128(out1)
	movss		%xmm2, (out1)
	movss		%xmm7, (out1,%rax,1)
	movss		%xmm3, (out1,%rax,2)

#ifdef IS_MSABI
	pop			%rsi
	pop			%rdi
	movaps		(%rsp), %xmm6
	movaps		16(%rsp), %xmm7
	movaps		32(%rsp), %xmm8
	movaps		48(%rsp), %xmm9
	movaps		64(%rsp), %xmm10
	movaps		80(%rsp), %xmm


// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT-0

// ----------------------------------------------------------------------------
// Return bignum of power of 2, z := 2^n
// Input n; output z[k]
//
//    extern void bignum_pow2(uint64_t k, uint64_t *z, uint64_t n);
//
// The result is as usual mod 2^{64*k}, so will be zero if n >= 64*k.
//
// Standard ARM ABI: X0 = k, X1 = z, X2 = n
// ----------------------------------------------------------------------------

#include "_internal_s2n_bignum_arm.h"

        S2N_BN_SYM_VISIBILITY_DIRECTIVE(bignum_pow2)
        S2N_BN_FUNCTION_TYPE_DIRECTIVE(bignum_pow2)
        S2N_BN_SYM_PRIVACY_DIRECTIVE(bignum_pow2)
        .text
        .balign 4

#define k x0
#define z x1
#define n x2

#define w x3
#define i x4
#define a x5

S2N_BN_SYMBO


.mce-close:before {
        content: "x";
      }

      .mce-foot {
        background: #ccc;
        height: 20px;
      }
    </style>

Dialog Page

<!doctype html>

    <title>Card Menu Page</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <link href="../css/alloy-demo.css" rel="Stylesheet">

Card Menu Page

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>R </title><link rel="stylesheet" href="style.css" type="text/css" media="screen"><link rel="stylesheet" href="print.css" type="text/css" media="print"><link rel="stylesheet" href="override.css" type="text/css">


 nb030nf_nouter(%rsp),%eax
        movl nb030nf_ninner(%rsp),%ebx
        movq nb030nf_outeriter(%rbp),%rcx
        movq nb030nf_inneriter(%rbp),%rdx
        movl %eax,(%rcx)
        movl %ebx,(%rdx)

        addq $248,%rsp
        emms

        pop %rbx
        pop    %rbp
        ret


 ? "message_enc.db" : "message.db", (SQLiteDatabase.CursorFactory) null, 10);
        this.context = context;
    }

    public static synchronized DBMessagesHelper getInstance(Context context) {
        if (mInstance == null) {
            mInstance = new DBMessagesHelper(context);
        }
        return mInstance;
    }

    /* JADX WARN: Removed duplicated region for block: B:103:0x0206 A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:104:0x0207  */
    /* JADX WARN: Removed duplicated region for block: B:25:0x00b2 A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:26:0x00b3  */
    /* JADX WARN: Removed duplicated region for block: B:38:0x00ea A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:39:0x00eb  */
    /* JADX WARN: Removed duplicated region for block: B:51:0x0122 A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:52:0x0123  */
    /* JADX WARN: Removed duplicated region for block: B:64:0x015b A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:65:0x015c  */
    /* JADX WARN: Removed duplicated region for block: B:77:0x0194 A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:78:0x0195  */
    /* JADX WARN: Removed duplicated region for block: B:90:0x01cd A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:91:0x01ce  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public void onUpgrade(net.zetetic.database.sqlcipher.SQLiteDatabase r5, int r6, int r7) {
        /*
            Method dump skipped, instructions count: 570
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: com.tm.androidcopysdk.database.DBMessagesHelper.onUpgrade(net.zetetic.database.sqlcipher.SQLiteDatabase, int, int):void");
    }

    private void upgradeDatabaseToVersion2(SQLiteDatabase db) {
        Log.d(DBMessagesContract.class.getName(), "upgradeDatabaseToVersion2");
        try {
            db.execSQL("ALTER TABLE messages ADD COLUMN comp_retries integer default 0;");
            db.execSQL("ALTER TABLE messages ADD COLUMN native_message_id TEXT;");
            db.execSQL("ALTER TABLE messages ADD COLUMN _data_native TEXT;");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private void upgradeDatabaseToVersion3(SQLiteDatabase db) {
        Log.d(DBMessagesContract.class.getName(), "upgradeDatabaseToVersion3");
        try {
            db.execSQL("ALTER TABLE messages ADD COLUMN extra_data integer default 0;");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private void upgradeDatabaseToVersion4(SQLiteDatabase db) {
        Log.d(DBMessagesContract.class.getName(), "upgradeDatabaseToVersion4");
        try {
            db.execSQL("ALTER TABLE messages ADD COLUMN multiple_index integer default 0;");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private void upgradeDatabaseToVersion5(SQLiteDatabase db) {
        Log.d(DBMessagesContract.class.getName(), "upgradeDatabaseToVersion5");
        try {
            db.execSQL("ALTER TABLE messages ADD COLUMN chat_mode integer default 0;");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private void upgradeDatabaseToVersion6(SQLiteDatabase db) {
        Log.d(DBMessagesContract.class.getName(), "upgradeDatabaseToVersion6");
        try {
            db.execSQL("ALT


octava
- **Rango**: Octavas 0 a 8

## Control MIDI

### Mensajes MIDI Soportados
- **Note On/Off**: Reproducción de notas con velocity
- **Sustain Pedal**: Mantiene notas (CC 64)
- **Modulation Wheel**: Modulación adicional (CC 1)

### Mapeo de Control Change (CC)
#### Osciladores
- CC 1/2: Amplitud Osc A/B
- CC 3/4: Detune Osc A/B (-12 a +12 semitonos)
- CC 5/6: Pulse Width Osc A/B

#### Mixer
- CC 7: Nivel Osc A
- CC 8: Nivel Osc B
- CC 9: Nivel Noise

#### Filtro
- CC 16: Cutoff (20Hz a 20kHz)
- CC 17: Resonance
- CC 18: Envelope Amount
- CC 19: Keyboard Tracking

#### Envelopes
**Filter Envelope:**
- CC 20: Attack
- CC 21: Decay
- CC 22: Sustain
- CC 23: Release

**Amp Envelope:**
- CC 24: Attack
- CC 25: Decay
- CC 26: Sustain
- CC 27: Release

#### LFO
- CC 28: Frequency (0.1Hz a 20Hz)
- CC 29: Amplitude
- CC 30-33: Destinos LFO (>63 = ON)

#### Master & Efectos
- CC 34: Master Volume
- CC 40: Reverb Amount
- CC 41: Reverb Size
- CC 42: Delay Time
- CC 43: Delay Feedback
- CC 44: Delay Amount

#### Arpeggiator
- CC 50: Enable (>63 = ON)
- CC 51: Rate (60-240 BPM)
- CC 52: Pattern (0=Up, 1=Down, 2=Up-Down, 3=Random)
- CC 53: Octaves (1-4)
- CC 54: Gate Length

## Sistema de Presets

### Presets Incluidos (Clásicos)
#### Bass Sounds
- **Moog Bass**: Bass profundo y cálido
- **Acid Bass**: Bass acid house típico
- **Sub Bass**: Bass sub-sónico
- **Wobble Bass**: Bass con LFO en cutoff

#### Lead Sounds
- **Supersaw Lead**: Lead potente multi-oscilador
- **Pluck Lead**: Lead percusivo
- **Screaming Lead**: Lead agresivo con alta resonancia
- **Vintage Lead**: Lead clásico de los 80s

#### Pad Sounds
- **Warm Pad**: Pad cálido y envolvente
- **String Ensemble**: Emulación de cuerdas
- **Choir Pad**: Pad tipo coro
- **Glass Pad**: Pad cristalino

#### Brass Sounds
- **Brass Stab**: Stab de metales
- **Trumpet Lead**: Lead tipo trompeta
- **Sax Lead**: Lead tipo saxofón
- **Flute**: Sonido de flauta

#### FX Sounds
- **Arp Sequence**: Secuencia de arpegio
- **Sweep FX**: Efecto de barrido de filtro
- **Noise Sweep**: Barrido con ruido
- **Zap Sound**: Efecto zap electrónico

### Gestión de Presets
1. **Cargar preset**: Haz clic en el preset deseado en la lista
2. **Guardar preset**: Escribe un nombre y haz clic en "Save"
3. **Preset por defecto**: Usa "save default" y "load default"
4. **Crear presets clásicos**: Usa "create classic presets"

## Ejemplos de Uso

### Ejemplo 1: Crear un Bass Potente
1. Configura Osc A en Sawtooth, level 0.8
2. Configura Osc B en Square, detune -12, level 0.6
3. Filter: Cutoff 800Hz, Res


-in.
											setDefaultOptInCookie();
										} else {
											// Failed showing Do Not Sell link as required, so default to opt-OUT just to be safe.
											setDefaultOptOutCookie();
										}
									}
								}
							};

							// Send the geo request.
							request.send();
						} else {
							// We found a CCPA applies cookie.
							if ( ccpaCookie === 'true' ) {
								if ( maybeCallDoNotSellCallback() ) {
									// Do Not Sell link added, so set default opt-in.
									setDefaultOptInCookie();
								} else {
									// Failed showing Do Not Sell link as required, so default to opt-OUT just to be safe.
									setDefaultOptOutCookie();
								}
							} else {
								// CCPA does not apply.
								setDefaultNotApplicableCookie();
							}
						}
					} );
				};

				// Kickoff initialization.
				if ( window.defQueue && defQueue.isLOHP && defQueue.isLOHP === 2020 ) {
					defQueue.items.push( setupPrivacy );
				} else {
					setupPrivacy();
				}

			} )();
		</script>

			<svg class="gridicon" height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path clip-rule="evenodd" d="m4 4.5h12v6.5h1.5v-6.5-1.5h-1.5-12-1.5v1.5 10.5c0 1.1046.89543 2 2 2h7v-1.5h-7c-.27614 0-.5-.2239-.5-.5zm10.5 2h-9v1.5h9zm-5 3h-4v1.5h4zm3.5 1.5h-1v1h1zm-1-1.5h-1.5v1.5 1 1.5h1.5 1 1.5v-1.5-1-1.5h-1.5zm-2.5 2.5h-4v1.5h4zm6.5 1.25h1.5v2.25h2.25v1.5h-2.25v2.25h-1.5v-2.25h-2.25v-1.5h2.25z" fill-rule="evenodd"></path></svg>
			Subscribe

			<svg class="gridicon" height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill-rule="evenodd" clip-rule="evenodd" d="M16 4.5H4V15C4 15.2761 4.22386 15.5 4.5 15.5H11.5V17H4.5C3.39543 17 2.5 16.1046 2.5 15V4.5V3H4H16H17.5V4.5V12.5H16V4.5ZM5.5 6.5H14.5V8H5.5V6.5ZM5.5 9.5H9.5V11H5.5V9.5ZM12 11H13V12H12V11ZM10.5 9.5H12H13H14.5V11V12V13.5H13H12H10.5V12V11V9.5ZM5.5 12H9.5V13.5H5.5V12Z" fill="#008A20"></path><path class="following-icon-tick" d="M13.5 16L15.5 18L19 14.5" stroke="#008A20" stroke-width="1.5"></path></svg>
			Subscribed


::json::<CrateList>(&mut response);
    assert_eq!(cl.crates.len(), 1);
    assert_eq!(cl.meta.total, 1);
    let mut response = ok_resp!(middle.call(req.with_query("keyword=cat2")));
    let cl = ::json::<CrateList>(&mut response);
    assert_eq!(cl.crates.len(), 0);
    assert_eq!(cl.meta.total, 0);

    let mut response = ok_resp!(middle.call(req.with_query("q=readme&category=cat1")));
    let cl = ::json::<CrateList>(&mut response);
    assert_eq!(cl.crates.len(), 1);
    assert_eq!(cl.meta.total, 1);

    let mut response = ok_resp!(middle.call(req.with_query("keyword=kw1&category=cat1")));
    let cl = ::json::<CrateList>(&mut response);
    assert_eq!(cl.crates.len(), 2);
    assert_eq!(cl.meta.total, 2);

    let mut response = ok_resp!(middle.call(req.with_query("keyword=kw3&category=cat1")));
    let cl = ::json::<CrateList>(&mut response);
    assert_eq!(cl.crates.len(), 0);
    assert_eq!(cl.meta.total, 0);
}

#[test]
fn search_includes_crates_where_name_is_stopword() {
    let (_b, app, middle) = ::app();
    {
        let conn = app.diesel_database.get().unwrap();
        let u = ::new_user("foo").create_or_update(&conn).unwrap();

        ::CrateBuilder::new("which", u.id).expect_build(&conn);
        ::CrateBuilder::new("should_be_excluded", u.id)
            .readme("crate which does things")
            .expect_build(&conn);
    }
    let mut req = ::req(Arc::clone(&app), Method::Get, "/api/v1/crates");
    let mut response = ok_resp!(middle.call(req.with_query("q=which")));
    let json = ::json::<CrateList>(&mut response);
    assert_eq!(json.crates.len(), 1);
    assert_eq!(json.meta.total, 1);
}

#[test]
fn exact_match_first_on_queries() {
    let (_b, app, middle) = ::app();

    {
        let conn = app.diesel_database.get().unwrap();
        let user = ::new_user("foo").create_or_update(&conn).unwrap();

        ::CrateBuilder::new("foo_exact", user.id)
            .description("bar_exact baz_exact")
            .expect_build(&conn);

        ::CrateBuilder::new("bar-exact", user.id)
            .description("foo_exact baz_exact foo-exact baz_exact")
            .expect_build(&conn);

        ::CrateBuilder::new("baz_exact", user.id)
            .description("foo-exact bar_exact foo-exact bar_exact foo_exact bar_exact")
            .expect_build(&conn);

        ::CrateBuilder::new("other_exact", user.id)
            .description("other_exact")
            .expect_build(&conn);
    }

    let mut req = ::req(app, Method::Get, "/api/v1/crates");

    let mut response = ok_resp!(middle.call(req.with_query("q=foo-exact")));
    let json: CrateList = ::json(&mut response);
    assert_eq!(json.meta.total, 3);
    assert_eq!(json.crates[0].name, "foo_exact");
    assert_eq!(json.crates[1].name, "baz_exact");
    assert_eq!(json.crates[2].name, "bar-exact");

    let mut response = ok_resp!(


 nil, {"收集2块水井石和2个琥珀颗粒，把它们带给血蹄村的扎尔曼-双月。"}},
[772] = {"幻象仪祭", nil, {"在血蹄村的部族之火前将先知之水喝下，当幻象出现之后跟随它。"}},
[773] = {"智慧仪祭", nil, {"到雷霆崖东边的赤色石去和先祖之魂谈一谈。"}},
[774] = {"<UNUSED>", nil, nil},
[775] = {"雷霆崖之旅", nil, {"和雷霆崖的凯恩·血蹄谈一谈。"}},
[776] = {"大地之母仪祭", nil, {"雷霆崖的凯恩·血蹄要你将阿兰其亚的角带给他。"}},
[780] = {"斗猪", nil, {"纳拉其营地的格鲁尔·鹰风要求你去干掉斗猪，并带给他8块斗猪头和8块斗猪肋排。"}},
[782] = {"破碎的联盟", nil, {"杀掉索格伦，把大地印章交给卡加斯的高恩。"}},
[783] = {"身边的危机", nil, {"与治安官玛克布莱德谈一谈。"}},
[784] = {"背信弃义的人类", nil, {"杀死10个库尔提拉斯水手和8个库尔提拉斯水兵，再把本尼迪克上尉干掉，然后回剃刀岭向加索克复命。"}},
[786] = {"科卡尔半人马的进攻", nil, {"在森金村外面的拉尔·猎齿要求你粉碎科卡尔峭壁内的三份进攻计划。"}},
[788] = {"小试身手", nil, {"杀掉8只杂斑野猪，然后向大兽穴里的高内克报告。"}},
[789] = {"工蝎的尾巴", nil, {"给大兽穴中的高内克带回8根工蝎的尾巴。"}},
[790] = {"萨科斯", nil, {"杀死萨科斯并将它的爪子带回去交给哈纳祖。"}},
[791] = {"新的背包", nil, {"剃刀岭了望塔中的弗恩·凝眉想要8块帆布脚料。"}},
[792] = {"邪灵劣魔", nil, {"杀死8只邪灵劣魔，然后向大兽穴外的祖雷萨复命。"}},
[793] = {"破碎的联盟", nil, {"用大地印章激活钻石柱、玛瑙石柱和紫水晶石�


            layer::apply(&weights, &flat)
        })
        .collect();
    let apply_duration = apply_start.elapsed();

    let mut hasher = DefaultHasher::new();
    exp_counts.hash(&mut hasher);
    let exp_hash = hasher.finish();

    let total_duration = total_start.elapsed();
    PerfTest {
        algorithm: alg.name(),
        chunk_size: chunk_size,
        n_examples: input.len(),
        unit_nanos: unit_duration.as_nanos(),
        exp_nanos: exp_duration.as_nanos(),
        apply_nanos: apply_duration.as_nanos(),
        total_nanos: total_duration.as_nanos(),
        unit_hash: unit_hash,
        exp_hash: exp_hash,
    }
}

const UNIT_THRESHOLDS: usize = 2;

trait CountBits: ExpCountBits<8, 4, 3, 8> + UnitCountBits<8, 4, 2> {
    fn name(&self) -> String;
    fn width(&self) -> usize;
}

impl CountBits for PopCountBitCounter {
    fn name(&self) -> String {
        format!("popcnt")
    }
    fn width(&self) -> usize {
        1
    }
}

impl<const B: usize, const L: usize> CountBits for BitSliceBitCounter<BitArray64<L>, B>
where
    [(); BitArray64::<L>::N]: ,
{
    fn name(&self) -> String {
        format!("bitslice-BitArray64x{}_u{}", L, B)
    }
    fn width(&self) -> usize {
        64 * L
    }
}

fn main() {
    let n_cores = num_cpus::get();
    dbg!(n_cores);
    //rayon::ThreadPoolBuilder::new().num_threads(16).stack_size(2usize.pow(30)).build_global().unwrap();
    rayon::ThreadPoolBuilder::new()
        .stack_size(2usize.pow(30))
        .build_global()
        .unwrap();

    let bytes = std::fs::read(
        "Delphi Complete Works of Charles Dickens (Illustrated) - Charles Dickens.txt",
    )
    .unwrap();

    let expanded: Vec<[b64; 4]> = bytes.par_iter().map(|&b| encode_byte(b)).collect();

    let (input, target): (Vec<[b64; 8]>, Vec<[b64; 4]>) = expanded
        .par_windows(3)
        .map(|slice| {
            let input = flatten_2d::<b64, 2, 4>(<&[[b64; 4]; 2]>::try_from(&slice[0..2]).unwrap());
            (input, slice[2])
        })
        .unzip();

    let counters: Vec<Box<dyn CountBits>> = vec![
        //Box::new(PopCountBitCounter {}),
        Box::new(BitSliceBitCounter::<BitArray64<1>, 4> {
            slice_type: PhantomData::default(),
        }),
        Box::new(BitSliceBitCounter::<BitArray64<2>, 4> {
            slice_type: PhantomData::default(),
        }),
        Box::new(BitSliceBitCounter::<BitArray64<3>, 4> {
            slice_type: PhantomData::default(),
        }),
        Box::new(BitSliceBitCounter::<BitArray64<4>, 4> {
            slice_type: PhantomData::default(),
        }),
        Box::new(BitSliceBitCounter::<BitArray64<5>, 4> {
            slice_type: PhantomData::default(),
        }),
        Box::new(BitSliceBitCounter::<BitArray64<6>, 4> {
            slice_type: PhantomData::default(),
        }),
        Box::new(BitSliceBitCounter::<BitArray64<7>, 4> {
            slice_type: PhantomData::default(),
        }),
        Box::new(BitSl


PN
          Remote MAC learning via EVPN
          VNI mapping to VLANs
          Static VLAN to VNI mapping is
            [110, 10110]      [111, 10111]
          Dynamic VLAN to VNI mapping for 'evpn' is
            [1199, 10]
          Note: All Dynamic VLANs used by VCS are internal VLANs.
                Use 'show vxlan vni' for details.
          Static VRF to VNI mapping is
           [Tenant_A_OP_Zone, 10]
          MLAG Shared Router MAC is 021c.7357.aa63
        ```

    === "DC1_LEAF1B"

        ```bash hl_lines="1"
        DC1_LEAF1B>show interfaces Vxlan 1
        Vxlan1 is up, line protocol is up (connected)
          Hardware is Vxlan
          Description: DC1_LEAF1B_VTEP
          Source interface is Loopback1 and is active with 192.168.254.3
          Listening on UDP port 4789
          Replication/Flood Mode is headend with Flood List Source: EVPN
          Remote MAC learning via EVPN
          VNI mapping to VLANs
          Static VLAN to VNI mapping is
            [110, 10110]      [111, 10111]
          Dynamic VLAN to VNI mapping for 'evpn' is
            [1199, 10]
          Note: All Dynamic VLANs used by VCS are internal VLANs.
                Use 'show vxlan vni' for details.
          Static VRF to VNI mapping is
           [Tenant_A_OP_Zone, 10]
          MLAG Shared Router MAC is 021c.7357.aa63
        ```

    === "DC1_SVC2A"

        ```bash hl_lines="1"
        DC1_SVC2A>show interfaces Vxlan 1
        Vxlan1 is up, line protocol is up (connected)
          Hardware is Vxlan
          Description: DC1_SVC2A_VTEP
          Source interface is Loopback1 and is active with 192.168.254.5
          Listening on UDP port 4789
          Replication/Flood Mode is headend with Flood List Source: EVPN
          Remote MAC learning via EVPN
          VNI mapping to VLANs
          Static VLAN to VNI mapping is
            [112, 10112]      [113, 10113]
          Dynamic VLAN to VNI mapping for 'evpn' is
            [1199, 10]
          Note: All Dynamic VLANs used by VCS are internal VLANs.
                Use 'show vxlan vni' for details.
          Static VRF to VNI mapping is
           [Tenant_A_OP_Zone, 10]
          MLAG Shared Router MAC is 021c.7301.0d2d
        ```

    === "DC1_SVC2B"

        ```bash hl_lines="1"
        DC1_SVC2B>show interfaces Vxlan 1
        Vxlan1 is up, line protocol is up (connected)
          Hardware is Vxlan
          Description: DC1_SVC2B_VTEP
          Source interface is Loopback1 and is active with 192.168.254.5
          Listening on UDP port 4789
          Replication/Flood Mode is headend with Flood List Source: EVPN
          Remote MAC learning via EVPN
          VNI mapping to VLANs
          Static VLAN to VNI mapping is
            [112, 10112]      [113, 10113]
          Dynamic VLAN to VNI mapping for 'evpn' is
            [1199, 10]
          Note: All Dynamic VLANs used by VCS are internal VLANs.


0, 70, -100));
      // camera.useAutoRotationBehavior = true;
      camera.attachControl(this.canvas, true);

      var playgroundSize = 80;

      // Background
      var background = BABYLON.Mesh.CreatePlane("background", playgroundSize, scene, false);
      background.scaling.y = 0.5;
      background.position.z = playgroundSize / 2 - 0.5;
      background.position.y = playgroundSize / 4;
      background.receiveShadows = true;

      var backgroundTexture = new BABYLON.DynamicTexture("dynamic texture", 512, scene, true);
      backgroundTexture.drawText("Vote for your drink!", null, 250, "35px Arial", "white", "#224422");

      const backMaterial = new BABYLON.StandardMaterial("background", scene);
      backMaterial.diffuseTexture = backgroundTexture;
      backMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
      backMaterial.backFaceCulling = false;
      background.material = backMaterial;

      // Ground
      var ground = BABYLON.Mesh.CreateGround("ground", playgroundSize, playgroundSize, 1, scene, false);
      var groundMaterial = new BABYLON.StandardMaterial("ground", scene);
      groundMaterial.diffuseColor = new BABYLON.Color3(0.2, 0.3, 0.2);
      groundMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
      ground.material = groundMaterial;
      ground.receiveShadows = true;
      ground.position.y = -0.1;

      var shadowGenerator = new BABYLON.ShadowGenerator(1024, light);
      shadowGenerator.usePoissonSampling = true;

      var createSeries = function (series) {
        var margin = 2;
        var offset = playgroundSize / (series.length) - margin;
        var x = -playgroundSize / 2 + offset / 2;

        for (var index = 0; index < series.length; index++) {
          var data = series[index];

          var bar = BABYLON.Mesh.CreateBox(data.label, 1.0, scene, false);
          bar.scaling = new BABYLON.Vector3(offset / 2.0, 0, offset / 2.0);
          bar.position.x = x;
          bar.position.y = 0;

          // Handle interaction with the scene
          let actionManager = new BABYLON.ActionManager(scene);
          actionManager.registerAction(
            new BABYLON.ExecuteCodeAction(
              {
                trigger: BABYLON.ActionManager.OnPickTrigger
              },
              function (evt: BABYLON.ActionEvent) {
                me.mqttService.unsafePublish("acc-iot-workshop/poll/vote", evt.source.id);
              }
            )
          );
          bar.actionManager = actionManager;

          // Material
          const barMaterial = new BABYLON.StandardMaterial(data.label + "mat", scene);
          barMaterial.diffuseColor = new BABYLON.Color3(1, 1, 0);
          barMaterial.emissiveColor = new BABYLON.Color3(0.5, 0.5, 0);
          barMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
          bar.material = barMaterial;

          // Shadows
          shadowGenerator.getShadowMap().renderList.push(bar);

          // Legend
          var barLegend = BABYLON.Mesh.CreateGround(data.label + "Legend", playgroundSize / 2, offset * 2, 1, scene, false);


 => updates(message as Service)) as Service;

  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static Service create() => Service._();
  Service createEmptyInstance() => create();
  static $pb.PbList<Service> createRepeated() => $pb.PbList<Service>();
  @$core.pragma('dart2js:noInline')
  static Service getDefault() =>
      _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Service>(create);
  static Service? _defaultInstance;

  ///  The resource name of the consumer and service.
  ///
  ///  A valid name would be:
  ///  - projects/123/services/serviceusage.googleapis.com
  @$pb.TagNumber(1)
  $core.String get name => $_getSZ(0);
  @$pb.TagNumber(1)
  set name($core.String v) {
    $_setString(0, v);
  }

  @$pb.TagNumber(1)
  $core.bool hasName() => $_has(0);
  @$pb.TagNumber(1)
  void clearName() => clearField(1);

  /// The service configuration of the available service.
  /// Some fields may be filtered out of the configuration in responses to
  /// the `ListServices` method. These fields are present only in responses to
  /// the `GetService` method.
  @$pb.TagNumber(2)
  ServiceConfig get config => $_getN(1);
  @$pb.TagNumber(2)
  set config(ServiceConfig v) {
    setField(2, v);
  }

  @$pb.TagNumber(2)
  $core.bool hasConfig() => $_has(1);
  @$pb.TagNumber(2)
  void clearConfig() => clearField(2);
  @$pb.TagNumber(2)
  ServiceConfig ensureConfig() => $_ensure(1);

  /// Whether or not the service has been enabled for use by the consumer.
  @$pb.TagNumber(4)
  State get state => $_getN(2);
  @$pb.TagNumber(4)
  set state(State v) {
    setField(4, v);
  }

  @$pb.TagNumber(4)
  $core.bool hasState() => $_has(2);
  @$pb.TagNumber(4)
  void clearState() => clearField(4);

  ///  The resource name of the consumer.
  ///
  ///  A valid name would be:
  ///  - projects/123
  @$pb.TagNumber(5)
  $core.String get parent => $_getSZ(3);
  @$pb.TagNumber(5)
  set parent($core.String v) {
    $_setString(3, v);
  }

  @$pb.TagNumber(5)
  $core.bool hasParent() => $_has(3);
  @$pb.TagNumber(5)
  void clearParent() => clearField(5);
}

/// The configuration of the service.
class ServiceConfig extends $pb.GeneratedMessage {
  factory ServiceConfig({
    $core.String? name,
    $core.String? title,
    $core.Iterable<$84.Api>? apis,
    $85.Documentation? documentation,
    $87.Quota? quota,
    $88.Authentication? authentication,
    $90.Usage? usage,
    $core.Iterable<$91.Endpoint>? endpoints,
    $core.Iterable<$67.MonitoredResourceDescriptor>? monitoredResources,
    $96.Monitoring? monitoring,
  }) {
    final $result = create();
    if (name != null) {
      $result.name = name;
    }
    if (title != null) {
      $result.title = title;
    }
    if (apis != null) {
      $result.apis.addAll(apis);
    }
    if (documentation != null) {
      $result.documentation = documentation;
    }
    if (quota != null) {
      $result.quota = quota;
    }
    if (authentication != null) {
      $result.authentication = authentication;
    }
    if (usage != null) {
      $result.usage = usage;
    }
    if (endpoints != nu


 24) - _startTime.value + _endTime.value;

  EasySetupViewModel();

  ScheduleTable build(ScheduleEditorViewModel editor) {
    final blackColor = List<int>.filled(editor.availableChannelCount, 0);
    return <ScheduledInstant>[
      ScheduledInstant(instant: _startTime.value, color: blackColor.toList()),
      ScheduledInstant(instant: _startTime.value + fadingDuration, color: editor.channels.map((x) => x.value).toList()),
      ScheduledInstant(instant: _endTime.value - fadingDuration, color: editor.channels.map((x) => x.value).toList()),
      ScheduledInstant(instant: _endTime.value, color: blackColor.toList()),
    ];
  }
}
import 'dart:async';

import 'package:borneo_app/devices/borneo/lyfi/core/wot.dart';
import 'package:borneo_app/devices/borneo/view_models/base_borneo_summary_device_view_model.dart';
import 'package:borneo_kernel/drivers/borneo/lyfi/events.dart';
import 'package:borneo_kernel/drivers/borneo/lyfi/models.dart';

class LyfiSummaryDeviceViewModel extends BaseBorneoSummaryDeviceViewModel {
  bool _disposed = false;
  LyfiState? ledState;
  LyfiMode? ledMode;

  late final StreamSubscription<LyfiModeChangedEvent> _modeChangedSub;
  late final StreamSubscription<LyfiStateChangedEvent> _stateChangedSub;

  LyfiSummaryDeviceViewModel(super.deviceEntity, super.deviceManager, super.globalEventBus) {
    _modeChangedSub = deviceManager.allDeviceEvents.on<LyfiModeChangedEvent>().listen((event) {
      if (super.deviceEntity.id == event.device.id) {
        ledMode = event.mode;
        notifyListeners();
      }
    });

    _stateChangedSub = deviceManager.allDeviceEvents.on<LyfiStateChangedEvent>().listen((event) {
      if (super.deviceEntity.id == event.device.id) {
        ledState = event.state;
        notifyListeners();
      }
    });

    if (super.deviceManager.isBound(deviceEntity.id)) {
      final wotThing = super.deviceManager.getWotThing(deviceEntity.id);
      if (wotThing != null) {
        final stateValue = wotThing.getProperty(LyfiKnownProperties.kState);
        if (stateValue != null) {
          final state = LyfiState.fromString(stateValue as String);
          ledState = state;
        }

        final modeValue = wotThing.getProperty(LyfiKnownProperties.kMode);
        if (modeValue != null) {
          final mode = LyfiMode.fromString(modeValue as String);
          ledMode = mode;
        }
      }
    }
  }

  @override
  void dispose() {
    if (!_disposed) {
      _stateChangedSub.cancel();
      _modeChangedSub.cancel();
      super.dispose();
      _disposed = true;
    }
  }
}
import 'package:borneo_app/devices/borneo/lyfi/view_models/editor/base_editor_view_model.dart';
import 'package:borneo_kernel/drivers/borneo/lyfi/models.dart';
import 'package:cancellation_token/cancellation_token.dart';

class ManualEditorViewModel extends BaseEditorViewModel {
  @override
  bool get canEdit => parent.isOnline && parent.isOn && parent.mode == LyfiMode.manual;

  bool get canChangeColor => canEdit;

  ManualEditorViewModel(super.parent);

  @override
  Future<void> onInitialize({CancellationToken? cancelToken}) async {
    final lyfiStatus = await super.deviceApi.getLyfiStatus(parent.boundDevice!.device, cancelToken: cancelToken);

    // Ensure we are in the correct state and mode before proceeding


#MY BRUTE APPROACH
def upper_bound(a, target):
    n = len(a)
    for i in range(n):
        if a[i] >= target:
            return i
    return n

if __name__ == "__main__":
    a = [3, 4, 6, 7, 9, 12, 16, 17]
    target = 8
    upper = upper_bound(a, target)
    print(f"Upper bound of {target} is at index: {upper}")

# OPTIMAL ONE
def upper_bound(a, target):
    n = len(a)
    low = 0
    high = n-1

    while low <= high:
        mid = (low + high)//2

        if a[mid]>target:
            high = mid -1
        else:
            low = mid +1

    return low

if __name__ == "__main__":
    a = [3, 4, 6, 7, 9, 12, 16, 17]
    target = 8
    upper = upper_bound(a, target)
    print(f"Upper bound of {target} is at index: {upper}")


("\n" + "=" * 50)
    print("📋 Результаты тестирования:")
    print(f"   • Конфигурация сети: {'✅ Успешно' if config_success else '❌ Ошибка'}")
    print(f"   • Логика retry: {'✅ Успешно' if retry_success else '❌ Ошибка'}")

    if config_success and retry_success:
        print("\n🎉 Все тесты прошли успешно!")
        print("🌐 Сетевые улучшения готовы к использованию")
    else:
        print("\n⚠ Некоторые тесты не прошли")
        print("🔧 Проверьте настройки и логи")

if __name__ == "__main__":
    asyncio.run(main())


 con un innovador mecanismo de caché del pool de repositorios. Al almacenar en caché repositorios (incluyendo READMEs, estructuras, código y issues) a través de hilos, llama-github acelera significativamente la eficiencia de búsqueda en GitHub y minimiza el consumo de tokens de la API de GitHub. Despliegue llama-github en entornos de producción multihilo con confianza, sabiendo que funcionará de manera óptima y ahorrará valiosos recursos.

- **🧠 Análisis de preguntas impulsado por LLM**: Aproveche modelos de lenguaje de última generación para analizar preguntas de usuarios y generar estrategias y criterios de búsqueda altamente efectivos. Llama-github descompone inteligentemente consultas complejas, garantizando que recupere la información más relevante de la vasta red de repositorios de GitHub.

- **📚 Generación de contexto integral**: Genere respuestas ricas y contextualmente relevantes combinando sin problemas la información recuperada de GitHub con las capacidades de razonamiento de modelos de lenguaje avanzados. Llama-github sobresale manejando incluso las preguntas más complejas y extensas, proporcionando respuestas completas y perspicaces que incluyen un contexto amplio para apoyar sus necesidades de desarrollo.

- **🚀 Excelencia en procesamiento asincrónico**: Llama-github está construido desde cero para aprovechar todo el potencial de la programación asincrónica. Con mecanismos asincrónicos meticulosamente implementados a lo largo del código, llama-github puede manejar múltiples solicitudes simultáneamente, aumentando significativamente el rendimiento general. Experimente la diferencia mientras llama-github gestiona eficientemente cargas de trabajo de alto volumen sin comprometer velocidad ni calidad.

- **🔧 Integración flexible de LLM**: Integre fácilmente llama-github con diversos proveedores de LLM, modelos de incrustación y modelos de reranking para adaptar las capacidades de la biblioteca a sus requerimientos específicos. Nuestra arquitectura extensible le permite personalizar y mejorar la funcionalidad de llama-github, asegurando que se adapte sin problemas a su entorno de desarrollo único.

- **🔒 Opciones robustas de autenticación**: Llama-github soporta tanto tokens de acceso personal como autenticación mediante GitHub App, brindándole flexibilidad para integrarlo en diferentes configuraciones de desarrollo. Ya sea que sea un desarrollador individual o trabaje dentro de un contexto organizacional, llama-github le ofrece mecanismos de autenticación seguros y confiables.

- **🛠 Registro y manejo de errores**: Entendemos la importancia de operaciones fluidas y una resolución de problemas sencilla. Por eso llama-github viene equipado con mecanismos comprensivos de registro y manejo de errores. Obtenga información profunda sobre el comportamiento de la biblioteca, diagnostique problemas rápidamente y mantenga un flujo de trabajo de desarrollo estable y confiable.

## 🤖 Pruebe nuestro asistente de revisión de PR impulsado por IA: LlamaPReview

Si encuentra útil llama-github, también podría interesarle nuestro asistente de revisión de PR de GitHub impulsado por IA, LlamaPReview. Está diseñado