;
			case MOVING_DOWN:
				if (!HORIZONTAL_SCROLLING && bounds.bottom <= 0) {
					// Fling off to the bottom bring previous view onto screen
					View vr = mChildViews.get(mCurrent-1);

					if (vr != null) {
						slideViewOntoScreen(vr);
						return true;
					}
				}
				break;
			}
			mScrollerLastX = mScrollerLastY = 0;
			// If the page has been dragged out of bounds then we want to spring back
			// nicely. fling jumps back into bounds instantly, so we don't want to use
			// fling in that case. On the other hand, we don't want to forgo a fling
			// just because of a slightly off-angle drag taking us out of bounds other
			// than in the direction of the drag, so we test for out of bounds only
			// in the direction of travel.
			//
			// Also don't fling if out of bounds in any direction by more than fling
			// margin
			Rect expandedBounds = new Rect(bounds);
			expandedBounds.inset(-FLING_MARGIN, -FLING_MARGIN);

			if(withinBoundsInDirectionOfTravel(bounds, velocityX, velocityY)
					&& expandedBounds.contains(0, 0)) {
				mScroller.fling(0, 0, (int)velocityX, (int)velocityY, bounds.left, bounds.right, bounds.top, bounds.bottom);
				mStepper.prod();
			}
		}

		return true;
	}

	public void onLongPress(MotionEvent e) { }

	public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX,
			float distanceY) {
		PageView pageView = (PageView)getDisplayedView();
		if (!tapDisabled)
			onDocMotion();
		if (!mScaling) {
			mXScroll -= distanceX;
			mYScroll -= distanceY;
			requestLayout();
		}
		return true;
	}

	public void onShowPress(MotionEvent e) { }

	public boolean onScale(ScaleGestureDetector detector) {
		float previousScale = mScale;
		mScale = Math.min(Math.max(mScale * detector.getScaleFactor(), MIN_SCALE), MAX_SCALE);

		{
			float factor = mScale/previousScale;

			View v = mChildViews.get(mCurrent);
			if (v != null) {
				float currentFocusX = detector.getFocusX();
				float currentFocusY = detector.getFocusY();
				// Work out the focus point relative to the view top left
				int viewFocusX = (int)currentFocusX - (v.getLeft() + mXScroll);
				int viewFocusY = (int)currentFocusY - (v.getTop() + mYScroll);
				// Scroll to maintain the focus point
				mXScroll += viewFocusX - viewFocusX * factor;
				mYScroll += viewFocusY - viewFocusY * factor;

				if (mLastScaleFocusX>=0)
					mXScroll+=currentFocusX-mLastScaleFocusX;
				if (mLastScaleFocusY>=0)
					mYScroll+=currentFocusY-mLastScaleFocusY;

				mLastScaleFocusX=currentFocusX;
				mLastScaleFocusY=currentFocusY;
				requestLayout();
			}
		}
		return true;
	}

	public boolean onScaleBegin(ScaleGestureDetector detector) {
		tapDisabled = true;
		mScaling = true;
		// Ignore any scroll amounts yet to be accounted for: the
		// screen is not showing the effect of them, so they can
		// only confuse the user
		mXScroll = mYScroll = 0;
		mLastScaleFocusX = mLastScaleFocusY = -1;
		return true;
	}

	public void onScaleEnd(ScaleGestureDetector detector) {
		mScaling = false;
	}

	@Override
	public boolean onTouchEvent(MotionEvent event) {
		if ((event.getAction() & event.getActionMasked()) == MotionEvent


d-kibana)
     1. [Tor proxy](#tor-proxy)
     1. [Execute Twint command](#execute-twint-command)
     1. [Examples of command](#examples-of-command)
  1. [Datas](#datas)
1. [Authors](#authors)
1. [🤝 Contributing](#-contributing)
1. [Show your support](#show-your-support)

## How to use

### First use

For first usage, you need to build image docker.

```shell
docker pull x0rzkov/twint:2.1.6
```

or

```shell
docker-compose build
```

#### Create an alias
```shell
alias twint="docker run -ti --rm -v $(pwd)/data:/opt/app/data x0rzkov/twint:2.1.6"
```

### Elasticsearch and Kibana

Start to up elaticsearch and kibana

```shell
docker-compose up -d elasticsearch kibana
```

### Tor proxy

Start to up tor

```shell
docker-compose up -d tor
```

### Twint Search interface

Start to up elasticsearch and twint-search

```shell
docker-compose up -d twint-search elasticsearch
```

Then open in your browser [http://localhost:3000](http://localhost:3000)

### Execute Twint command

```shell
docker-compose run -v $PWD/twint:/opt/app/data twint -h
```

### Examples of command

A few simple examples to help you understand the basics:

	Scrape all the Tweets from user's timeline.
	docker-compose run -v $PWD/twint:/opt/app/data twint -u username

	Scrape all Tweets from the user's timeline containing pineapple.
	docker-compose run -v $PWD/twint:/opt/app/data twint -u username -s pineapple

	Collect every Tweet containing pineapple from everyone's Tweets.
	docker-compose run -v $PWD/twint:/opt/app/data twint -s pineapple

	Collect Tweets that were tweeted before 2014.
	docker-compose run -v $PWD/twint:/opt/app/data twint -u username --year 2019

	Collect Tweets that were tweeted since 2015-12-20.
	docker-compose run -v $PWD/twint:/opt/app/data twint -u username --since 2015-12-20

	Scrape Tweets and save to file.txt.
	docker-compose run -v $PWD/twint:/opt/app/data twint -u username -o file.txt

	Scrape Tweets and save as a csv file.
	docker-compose run -v $PWD/twint:/opt/app/data twint -u username -o file.csv --csv

	Show Tweets that might have phone numbers or email addresses.
	docker-compose run -v $PWD/twint:/opt/app/data twint -u username --email --phone


O -- this version only sets voxels which have centers inside the sphere.  which is best?
            // // Store our current position as a vector...
            // glm::vec4 pos(x + 0.5f, y + 0.5f, z + 0.5f, 1.0); // consider voxels cenetered on their coordinates
            // // convert to world coordinates
            // glm::vec3 worldPos = glm::vec3(vtwMatrix * pos);
            // // compute how far the current position is from the center of the volume
            // float fDistToCenter = glm::distance(worldPos, centerWorldCoords);
            // // If the current voxel is less than 'radius' units from the center then we set its value
            // if (fDistToCenter <= radiusWorldCoords) {
            //     result |= setVoxelInternal(x, y, z, toValue);
            // }
        });
    });
    if (result) {
        startUpdates();
    }

    return result;
}

bool RenderablePolyVoxEntityItem::setCapsule(const vec3& startWorldCoords, const vec3& endWorldCoords,
                                             float radiusWorldCoords, uint8_t toValue) {
    bool result = false;
    if (_locked) {
        return result;
    }

    glm::mat4 vtwMatrix = voxelToWorldMatrix();
    glm::mat4 wtvMatrix = glm::inverse(vtwMatrix);

    glm::vec3 dimensions = getScaledDimensions();
    glm::vec3 voxelSize = dimensions / _voxelVolumeSize;
    float smallestDimensionSize = voxelSize.x;
    smallestDimensionSize = glm::min(smallestDimensionSize, voxelSize.y);
    smallestDimensionSize = glm::min(smallestDimensionSize, voxelSize.z);

    glm::vec3 maxRadiusInVoxelCoords = glm::vec3(radiusWorldCoords / smallestDimensionSize);

    glm::vec3 startInVoxelCoords = wtvMatrix * glm::vec4(startWorldCoords, 1.0f);
    glm::vec3 endInVoxelCoords = wtvMatrix * glm::vec4(endWorldCoords, 1.0f);

    glm::vec3 low = glm::min(glm::floor(startInVoxelCoords - maxRadiusInVoxelCoords),
                             glm::floor(endInVoxelCoords - maxRadiusInVoxelCoords));
    glm::vec3 high = glm::max(glm::ceil(startInVoxelCoords + maxRadiusInVoxelCoords),
                              glm::ceil(endInVoxelCoords + maxRadiusInVoxelCoords));

    glm::ivec3 lowI = glm::clamp(low, glm::vec3(0.0f), _voxelVolumeSize);
    glm::ivec3 highI = glm::clamp(high, glm::vec3(0.0f), _voxelVolumeSize);

    // This three-level for loop iterates over every voxel in the volume that might be in the capsule
    withWriteLock([&] {
        loop3(lowI, highI, [&](const ivec3& v) {
            // Store our current position as a vector...
            glm::vec4 pos{ vec3(v) + 0.5f, 1.0 }; // consider voxels cenetered on their coordinates
            // convert to world coordinates
            glm::vec3 worldPos = glm::vec3(vtwMatrix * pos);
            if (pointInCapsule(worldPos, startWorldCoords, endWorldCoords, radiusWorldCoords)) {
                result |= setVoxelInternal(v, toValue);
            }
        });
    });
    if (result) {
        startUpdates();
    }

    return result;
}

class RaycastFunctor {
public:
    RaycastFunctor(const std::shared_ptr<PolyVox::SimpleVolume<uint8_t>>& vol) :


 {@link ExtraKeysView} to display the extra key
 * views.
 *
 * The {@code propertiesInfo} passed to the constructors of this class must be json array of arrays.
 * Each array element of the json array will be considered a separate row of keys.
 * Each key can either be simple string that defines the name of the key or a json dict that defines
 * advance info for the key. The syntax can be `'KEY'` or `{key: 'KEY'}`.
 * For example `HOME` or `{key: 'HOME', ...}.
 *
 * In advance json dict mode, the key can also be a sequence of space separated keys instead of one
 * key. This can be done by replacing `key` key/value pair of the dict with a `macro` key/value pair.
 * The syntax is `{macro: 'KEY COMBINATION'}`. For example {macro: 'HOME RIGHT', ...}.
 *
 * In advance json dict mode, you can define a nested json dict with the `popup` key which will be
 * used as the popup key and will be triggered on swipe up. The syntax can be
 * `{key: 'KEY', popup: 'POPUP_KEY'}` or `{key: 'KEY', popup: {macro: 'KEY COMBINATION', display: 'Key combo'}}`.
 * For example `{key: 'HOME', popup: {KEY: 'END', ...}, ...}`.
 *
 * In advance json dict mode, the key can also have a custom display name that can be used as the
 * text to display on the button by defining the `display` key. The syntax is `{display: 'DISPLAY'}`.
 * For example {display: 'Custom name', ...}.
 *
 * Examples:
 * {@code
 * # Empty:
 * []
 *
 * # Single row:
 * [[ESC, TAB, CTRL, ALT, {key: '-', popup: '|'}, DOWN, UP]]
 *
 * # 2 row:
 * [['ESC','/',{key: '-', popup: '|'},'HOME','UP','END','PGUP'],
 * ['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN']]
 *
 * # Advance:
 * [[
 *   {key: ESC, popup: {macro: "CTRL f d", display: "tmux exit"}},
 *   {key: CTRL, popup: {macro: "CTRL f BKSP", display: "tmux ←"}},
 *   {key: ALT, popup: {macro: "CTRL f TAB", display: "tmux →"}},
 *   {key: TAB, popup: {macro: "ALT a", display: A-a}},
 *   {key: LEFT, popup: HOME},
 *   {key: DOWN, popup: PGDN},
 *   {key: UP, popup: PGUP},
 *   {key: RIGHT, popup: END},
 *   {macro: "ALT j", display: A-j, popup: {macro: "ALT g", display: A-g}},
 *   {key: KEYBOARD, popup: {macro: "CTRL d", display: exit}}
 * ]]
 *
 * }
 *
 * Aliases are also allowed for the keys that you can pass as {@code extraKeyAliasMap}. Check
 * {@link ExtraKeysConstants#CONTROL_CHARS_ALIASES}.
 *
 * Its up to the {@link ExtraKeysView.IExtraKeysView} client on how to handle individual key values
 * of an {@link ExtraKeyButton}. They are sent as is via
 * {@link ExtraKeysView.IExtraKeysView#onExtraKeyButtonClick(View, ExtraKeyButton, MaterialButton)}. The
 * {@link TerminalExtraKeys} which is an implementation of the interface,
 * checks if the key is one of {@link ExtraKeysConstants#PRIMARY_KEY_CODES_FOR_STRINGS} and generates
 * a {@link android.view.KeyEvent} for it, and if its not, then converts the key to code points by
 * calling {@link CharSequence#codePoints()} and passes them to the terminal as literal strings.
 *
 * Examples:
 * {@code
 * "ENTER" will trigger the ENTER keycode
 * "LEFT" will trigger the LEFT keycode and be displayed as "←"
 * "→" will input a "→" character
 * "−" will input a "−" character
 * "-_-" will input the string "-_-"
 * }
 *
 * For more info, check https://wiki.termux.com/wiki/Touch_Keyboard.
 */
public class ExtraKeysInfo {

    /**
     * Matrix of buttons to be displayed in {@link ExtraKeysView}.
     */
    private final ExtraKeyButton[][] mButtons;

    /**
     * Initialize {@link ExtraKeysInfo}.
     *
     * @param propertiesInfo The {@link String} containing the info to create the {@link ExtraKeysInfo}.
     *                       Check the class ja


rve->mYAxisVector.size() > i) { // parameters have just start and stop points in the dataset
        value = pPlotCurve->mYAxisVector.at(i);
      } else if (pPlotCurve && pPlotCurve->mYAxisVector.size() > 0) { // Set last value to have constant values for parameters
        value = pPlotCurve->mYAxisVector.last();
      } else { // otherwise set value to 0.0 but perhaps we should never reach there.
        value = 0.0;
      }
      OMCInterface::convertUnits_res convertUnit = MainWindow::instance()->getOMCProxy()->convertUnits(pPlotCurve->getYDisplayUnit(), pPlotCurve->getYUnit());
      if (convertUnit.unitsCompatible) {
        data << StringHandler::number(Utilities::convertUnit(value, convertUnit.offset, convertUnit.scaleFactor));
      } else {
        data << StringHandler::number(value);
      }
    }
    contents.append(data.join(",")).append("\n");
  }
  // create a file
  if (MainWindow::instance()->getLibraryWidget()->saveFile(fileName, contents)) {
    MessagesWidget::instance()->addGUIMessage(MessageItem(MessageItem::Modelica, tr("Exported variables in %1").arg(fileName), Helper::scriptingKind, Helper::notificationLevel));
  }
}

/*!
 * \brief PlotWindowContainer::updatePlotWindows
 * Updates the plot windows when the result file is updated.
 * \param variable
 */
void PlotWindowContainer::updatePlotWindows(QString variable)
{
  foreach (QMdiSubWindow *pSubWindow, subWindowList()) {
    if (isPlotWindow(pSubWindow->widget())) {
      PlotWindow *pPlotWindow = qobject_cast<PlotWindow*>(pSubWindow->widget());
      foreach (PlotCurve *pPlotCurve, pPlotWindow->getPlot()->getPlotCurvesList()) {
        if (variable.compare(pPlotCurve->getFileName()) == 0) {
          pPlotWindow->getPlot()->removeCurve(pPlotCurve);
          pPlotCurve->detach();
          pPlotWindow->updatePlot();
        }
      }
    } // is plotWidget
  }
}

/*!
 * \brief addRenameTabToSubWindowSystemMenu
 * Adds the rename tab action to the sub system menu
 */
void PlotWindowContainer::addRenameTabToSubWindowSystemMenu(QMdiSubWindow *pMdiSubWindow)
{
  QAction *pRenamePlotWindowAction = new QAction(tr("Rename"), pMdiSubWindow);
  pRenamePlotWindowAction->setStatusTip(tr("Renames the plot tab"));
  connect(pRenamePlotWindowAction, SIGNAL(triggered()), SLOT(renamePlotWindow()));
  QMenu *pMenu = pMdiSubWindow->systemMenu();
  pMenu->addAction(pRenamePlotWindowAction);
}
/*
 * This file is part of OpenModelica.
 *
 * Copyright (c) 1998-CurrentYear, Open Source Modelica Consortium (OSMC),
 * c/o Linköpings universitet, Department of Computer and Information Science,
 * SE-58183 Linköping, Sweden.
 *
 * All rights reserved.
 *
 * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR
 * THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2.
 * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES
 * RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3,
 * ACCORDING TO RECIPIENTS CHOICE.
 *
 * The OpenModelica software and the Open Source Modelica
 * Consortium (OSMC) Public License (OSMC-PL) are obtained
 * from OSMC, either from the above address,
 * from the URLs: http://www.ida.liu.se/projects/OpenModelica or
 * http://www.openmodelica.org, and in the OpenModelica distribution.
 * GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html.
 *
 *


 '@angular/common/http';
import { Injectable } from '@angular/core';

/*
  Generated class for the TimerProvider provider.

  See https://angular.io/guide/dependency-injection for more info on providers
  and Angular DI.
*/
@Injectable()
export class TimerProvider {
  timeInSeconds:any;
  time:any;
  runTimer:any;
  hasStarted:any;
  hasFinished:any;
  remainingTime:any;
  displayTime:any;
  constructor(public http: HttpClient) {
    console.log('Hello TimerProvider Provider');
    this.initTimer();
    this.startTimer();
  }
  initTimer() {
    // Pomodoro is usually for 25 minutes
   if (!this.timeInSeconds) {
     this.timeInSeconds = 300;
   }

   this.time = this.timeInSeconds;
   this.runTimer = false;
   this.hasStarted = false;
   this.hasFinished = false;
   this.remainingTime = this.timeInSeconds;

   this.displayTime = this.getSecondsAsDigitalClock(this.remainingTime);
 }

 startTimer() {
    this.runTimer = true;
   this.hasStarted = true;
   this.timerTick();
 }

 pauseTimer() {
   this.runTimer = false;
 }

 resumeTimer() {
   this.startTimer();
 }

 timerTick() {
   setTimeout(() => {

     if (!this.runTimer) { return; }
     this.remainingTime--;
     this.displayTime = this.getSecondsAsDigitalClock(this.remainingTime);
     if (this.remainingTime > 0) {
       this.timerTick();
     }
     else {
       this.hasFinished = true;
     }
   }, 1000);
 }

 getSecondsAsDigitalClock(inputSeconds: number) {
   var sec_num = parseInt(inputSeconds.toString(), 10); // don't forget the second param
   var hours = Math.floor(sec_num / 3600);
   var minutes = Math.floor((sec_num - (hours * 3600)) / 60);
   var seconds = sec_num - (hours * 3600) - (minutes * 60);
   var hoursString = '';
   var minutesString = '';
   var secondsString = '';
   hoursString = (hours < 10) ? "0" + hours : hours.toString();
   minutesString = (minutes < 10) ? "0" + minutes : minutes.toString();
   secondsString = (seconds < 10) ? "0" + seconds : seconds.toString();
   //return hoursString + ':' + minutesString + ':' + secondsString;
   return  minutesString + ':' + secondsString;
 }

}
import express, { Request, Response, NextFunction, ErrorRequestHandler } from "express";
import routes from './routes';
import cors from 'cors';

const app = express()
app.use(cors());
app.use(express.json())
app.use(routes)

interface ResponseError extends Error {
    status?: number;
  }

// notFound
app.use((error: Error, req: Request, res: Response, next: NextFunction) => {
    var err = new Error('Not Found');
    var err1 = new Error('Internal Server Error');

    if(res.status(404)) {
     next(err);
    }

    if(res.status(500)) {
     next(err1);
    }

})

// catch all
app.use((error: ResponseError, req: Request, res: Response, next: NextFunction) => {
    res.status(error.status || 500)
    res.json({ error: error.message})
})

app.listen(3333, () =>  console.log('Server is running'))import mongoose, { Schema, Document } from 'mongoose';

export enum  CapabilityType {
  API = 'API',
  Collaboration = 'COLLABORATION',
  EnterpriseReadiness = 'ENTERPRISEREADINESS',
  IDE = 'IDE',
  Monitoring = 'MONITORING',
  Security = 'SECURITY',
  SourceControlManagement = 'SOURCECONTROLMANAGEMENT',
  Testing = 'TESTING',
  Tracing = 'TRACING',
};

export interface IReviewer extends Document {
  _id: string;
  firstName:  string;


 if (open || close) {array.open = open; array.close = close}
      if (style === "D") {array.arraydef.displaystyle = true}
      if (align != null) {array.arraydef.columnalign = align}
      this.Push(array);
    },

    Entry: function (name) {
      this.Push(STACKITEM.cell().With({isEntry: true, name: name}));
      if (this.stack.Top().isCases) {
        //
        //  Make second column be in \text{...} (unless it is already
        //  in a \text{...}, for backward compatibility).
        //
        var string = this.string;
        var braces = 0, close = -1, i = this.i, m = string.length;
        //
        //  Look through the string character by character...
        //
        while (i < m) {
          var c = string.charAt(i);
          if (c === "{") {
            //
            //  Increase the nested brace count and go on
            //
            braces++;
            i++;
          } else if (c === "}") {
            //
            //  If there are too many close braces, just end (we will get an
            //    error message later when the rest of the string is parsed)
            //  Otherwise
            //    decrease the nested brace count,
            //    if it is now zero and we haven't already marked the end of the
            //      first brace group, record the position (use to check for \text{} later)
            //    go on to the next character.
            //
            if (braces === 0) {
              m = 0;
            } else {
              braces--;
              if (braces === 0 && close < 0) {
                close = i - this.i;
              }
              i++;
            }
          } else if (c === "&" && braces === 0) {
            //
            //  Extra alignment tabs are not allowed in cases
            //
            TEX.Error(["ExtraAlignTab","Extra alignment tab in \\cases text"]);
          } else if (c === "\\") {
            //
            //  If the macro is \cr or \\, end the search, otherwise skip the macro
            //  (multi-letter names don't matter, as we will skip the rest of the
            //   characters in the main loop)
            //
            if (string.substr(i).match(/^((\\cr)[^a-zA-Z]|\\\\)/)) {m = 0} else {i += 2}
          } else {
            //
            //  Go on to the next character
            //
            i++;
          }
        }
        //
        //  Check if the second column text is already in \text{},
        //  If not, process the second column as text and continue parsing from there,
        //    (otherwise process the second column as normal, since it is in \text{}
        //
        var text = string.substr(this.i,i-this.i);
        if (!text.match(/^\s*\\text[^a-zA-Z]/) || close !== text.replace(/\s+$/,'').length - 1) {
          this.Push.apply(this,this.InternalMath(text,0));
          this.i = i;
        }
      }
    },

    Cr: function (name) {
      this.Push(STACKITEM.cell().With({isCR: true, name: name}));
    },

    CrLaTeX: function (name) {
      var n;
      if (this.string.charAt(this.i) === "[") {
        n = this.GetBrackets(name,"").replace(/ /g,"").replace(/,/,".");
        if (n && !this.matchDimen(n))


is a YMM register.

Note: VEX.L must be 0, otherwise the instruction will #UD.

Operation

PACKSSWB (with 64-bit operands)

    DEST[7:0] ← SaturateSignedWordToSignedByte DEST[15:0];
    DEST[15:8] ← SaturateSignedWordToSignedByte DEST[31:16];
    DEST[23:16] ← SaturateSignedWordToSignedByte DEST[47:32];
    DEST[31:24] ← SaturateSignedWordToSignedByte DEST[63:48];
    DEST[39:32] ← SaturateSignedWordToSignedByte SRC[15:0];
    DEST[47:40] ← SaturateSignedWordToSignedByte SRC[31:16];
    DEST[55:48] ← SaturateSignedWordToSignedByte SRC[47:32];
    DEST[63:56] ← SaturateSignedWordToSignedByte SRC[63:48];

PACKSSDW (with 64-bit operands)

    DEST[15:0] ← SaturateSignedDoublewordToSignedWord DEST[31:0];
    DEST[31:16] ← SaturateSignedDoublewordToSignedWord DEST[63:32];
    DEST[47:32] ← SaturateSignedDoublewordToSignedWord SRC[31:0];
    DEST[63:48] ← SaturateSignedDoublewordToSignedWord SRC[63:32];

PACKSSWB instruction (128-bit Legacy SSE version)

    DEST[7:0]← SaturateSignedWordToSignedByte (DEST[15:0]);
    DEST[15:8] ← SaturateSignedWordToSignedByte (DEST[31:16]);
    DEST[23:16] ← SaturateSignedWordToSignedByte (DEST[47:32]);
    DEST[31:24] ← SaturateSignedWordToSignedByte (DEST[63:48]);
    DEST[39:32] ← SaturateSignedWordToSignedByte (DEST[79:64]);
    DEST[47:40] ←SaturateSignedWordToSignedByte (DEST[95:80]);
    DEST[55:48] ← SaturateSignedWordToSignedByte (DEST[111:96]);
    DEST[63:56] ← SaturateSignedWordToSignedByte (DEST[127:112]);
    DEST[71:64] ← SaturateSignedWordToSignedByte (SRC[15:0]);
    DEST[79:72] ← SaturateSignedWordToSignedByte (SRC[31:16]);
    DEST[87:80] ← SaturateSignedWordToSignedByte (SRC[47:32]);
    DEST[95:88] ← SaturateSignedWordToSignedByte (SRC[63:48]);
    DEST[103:96] ← SaturateSignedWordToSignedByte (SRC[79:64]);
    DEST[111:104] ← SaturateSignedWordToSignedByte (SRC[95:80]);
    DEST[119:112] ← SaturateSignedWordToSignedByte (SRC[111:96]);
    DEST[127:120] ← SaturateSignedWordToSignedByte (SRC[127:112]);

PACKSSDW instruction (128-bit Legacy SSE version)

    DEST[15:0] ← SaturateSignedDwordToSignedWord (DEST[31:0]);
    DEST[31:16] ← SaturateSi


style='font-weight:bold;'>TTP Group: T1059.006, T1547, T1495, T1053.005, T1518.001, T1059.007, T1106, T1090, T1105, T1078.003, T1055.012, T1113, T1132, T1574.001, T1574.002, T1546, T1018, T1219.002, T1552.001, T1021, T1068, T1136, T1001, T1583.005, T1570, T1566, T1503, T1110, T1016, T1074.001, T1608.001, T1053, T1127, T1566.002, T1557, T1082, T1555, T1531, T1012, T1559, T1124, T1560.001, T1056.001, T1059.003, T1083, T1119, T1071.001, T1022, T1057, T1059, T1134, T1553, T1518, T1204.002, T1005, T1030, T1132.001, T1543.003, T1218.005, T1204.001, T1193, T1588.002, T1573.001, T1562.001, T1036.004, T1056, T1588, T1486, T1203, T1449, T1070.004, T1087, T1583, T1078, T1568, T1598.003, T1587, T1585.002, T1059.005, T1129, T1496, T1564, T1497.001, T1074, T1046, T1135, T1195, T1585, T1490, T1560, T1052, T1102.002, T1007, T1020, T1112, T1123, T1060, T1218.011, T1552, T1566.001, T1040, T1185, T1573, T1608, T1102, T1036, T1219, T1176, T1489, T1550, T1574, T1553.002, T1027.002, T1031, T1199, T1095, T1033, T1583.001, T1140, T1114, T1008, T1598, T1087.001, T1221, T1583.003, T1560.003, T1063, T1539, T1064, T1583.004, T1562, T1071, T1505.003, T1588.004, T1027, T1070, T1094, T1189, T1587.001, T1567.002, T1530, T1192, T1003, T1569, T1543, T1218, T1567, T1003.001, T1204, T1041, T1011, T1072, T1497, T1547.001, T1133, T1045, T1055, T1104, T1037, T1571, T1036.005, T1059.001, T1049, T1047 (2 occurrences, 0.31%)

TTP Group: T1194, T1547, T1053.005, T1106, T1105, T1090, T1055.012, T1113, T1132, T1574.001, T1574.002, T1546, T1018, T1021, T1068, T1136, T1570, T1566, T1016, T1074.001, T1608.001, T1053, T1127, T1566.002, T1082, T1012, T1021.001, T1190, T1124, T1560.001, T1056.001, T1059.003, T1083, T1119, T1590, T1071.001,


->filetab + object_lod_numlods * sizeof( char* ) );
		for ( lod = 0; lod < object_lod_numlods; lod++ ) {

			lodinfo->filetab[ lod ] = fnamestore;
			strcpy( fnamestore, object_lod_fnames[ lod ] );
			fnamestore += strlen( object_lod_fnames[ lod ] ) + 1;

			if ( lod < object_lod_numlods - 1 ) {
				lodinfo->lodmags[ lod ] = FLOAT_TO_GEOMV( object_lod_mags[ lod ] );
				lodinfo->lodmins[ lod ] = FLOAT_TO_GEOMV( object_lod_mins[ lod ] );
			} else {
				lodinfo->lodmags[ lod ] = GEOMV_0;
				lodinfo->lodmins[ lod ] = GEOMV_0;
			}
		}

		// attach lodinfo table
		ObjectInfo[ insertindex ].lodinfo = lodinfo;
	}

	// actually load data and create object
	return OBJ_LoadODT( insertindex, flags, shader );
}

// determine lod spec for object, fill tables accordingly ---------------------
//
PRIVATE
int DetermineODTLodSpec( char *fname, key_value_s *lodmags, key_value_s *lodmins )
{
	ASSERT( fname != NULL );
	ASSERT( lodmags != NULL );
	ASSERT( lodmins != NULL );

	// parse filename, determine lods
	int numlods = 0;
	char *fdest = object_lod_fname_storage;
	ASSERT( fdest != NULL );

	for ( char *fscan = fname; ; ) {

		// strip whitespace
		while ( *fscan == ' ' )
			fscan++;
		fname = fscan;
		if ( *fscan == 0 )
			break;
		while ( ( *fscan != ' ' ) && ( *fscan != 0 ) )
			fscan++;

		// avoid overflowing tables
		if ( numlods >= MAX_OBJECT_LODS ) {
			CON_AddLine( too_many_lod_fnames );
			break;
		}

		int last = ( *fscan == 0 );
		*fscan++ = 0;

		// process file name and use current workdir
		fname = SubstCurWorkDir( fname );

		int len = strlen( fname );
		if ( ( len < 5 ) || ( fname[ len - 4 ] != '.' ) ) {
			CON_AddLine( MakeFileNameMsg( filename_invalid, fname ) );
			return FALSE;
		}

		// try to find odt file
		FILE *fp = SYS_fopen( fname, "rb" );
		if ( fp == NULL ) {
			CON_AddLine( MakeFileNameMsg( object_not_found, fname ) );
			return FALSE;
		}
		SYS_fclose( fp );

		//NOTE:
		// this check is necessary to prevent OBJ_LoadODT() from
		// exiting with an error message to the shell later on if
		// the object file is simply missing.

		// store lod file name
		strcpy( fdest, fname );
		object_lod_fnames[ numlods++ ] = fdest;
		fdest += strlen( fname ) + 1;

		if ( last ) {
			break;
		}
	}

	if ( numlods < 1 ) {
		CON_AddLine( filename_missing );
		return FALSE;
	}

	// set temporary global
	object_lod_numlods = numlods;

	if ( numlods == 1 ) {
		if ( lodmags->value != NULL )
			CON_AddLine( ignore_lodmags );
		if ( lodmins->value != NULL )
			CON_AddLine( ignore_lodmins );
		return TRUE;
	}

	// thresholds are between lods
	int numthresh = numlods - 1;

	// parse lod mags and mins
	if ( ScanKeyValueFloatList( lodmags, object_lod_mags, numthresh, numthresh ) != numthresh ) {
		CON_AddLine( invalid_lodmags );
		return


    api(project(":dashboard:jt-dashboard-client-spring-boot-starter"))

    api("org.springframework.boot:spring-boot-starter-web")
    api("org.springframework.boot:spring-boot-starter-actuator")

    testImplementation("org.springframework.boot:spring-boot-starter-test")
    testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
import io.github.hylexus.xtream.codec.gradle.utils.XtreamConfig.xtreamConfig
import io.github.hylexus.xtream.codec.gradle.utils.logInfo2
import io.github.hylexus.xtream.codec.gradle.utils.logTip
import java.time.LocalDate
import java.time.format.DateTimeFormatter

plugins {
    id("java-library")
    id("io.spring.dependency-management")
    id("maven-publish")
    id("io.gitee.pkmer.pkmerboot-central-publisher") apply false
    id("signing")
    id("checkstyle")
    id("net.minecraftforge.licenser")
    id("com.github.jk1.dependency-license-report")
    id("com.namics.oss.gradle.license-enforce-plugin")
}

val mavenPublications = setOf(
    "xtream-codec-base",
    "xtream-codec-core",
    "xtream-codec-server-reactive",
    "jt-808-server-spring-boot-starter-reactive",
    "jt-808-server-dashboard-spring-boot-starter-reactive",
)

version = xtreamConfig.projectVersion
run {
    xtreamConfig.javaVersion
    xtreamConfig.defaultSpringBootBomVersion
    xtreamConfig.defaultSpringCloudBomVersion
    xtreamConfig.needSign
}
val mavenRepoConfig = xtreamConfig.mavenRepoConfig

// region Java
configure(subprojects) {

    version = xtreamConfig.projectVersion

    if (!isJavaProject(project)) {
        return@configure
    }
    logInfo2("configuring project: ${project.name}")

    apply(plugin = "java-library")
    java {
        sourceCompatibility = JavaVersion.toVersion(xtreamConfig.javaVersion)
        targetCompatibility = JavaVersion.toVersion(xtreamConfig.javaVersion)
    }
    tasks.test {
        useJUnitPlatform()
    }
    tasks.withType<JavaCompile> {
        options.compilerArgs.add("-parameters")
        options.release.set(xtreamConfig.javaVersion.toInt())
    }

    apply(plugin = "io.spring.dependency-management")
    dependencyManagement {
        resolutionStrategy {
            cacheChangingModulesFor(0, TimeUnit.SECONDS)
        }
        applyMavenExclusions(false)
        generatedPomCustomization {
            enabled(false)
        }
        imports {
            mavenBom("org.springframework.boot:spring-boot-dependencies:${xtreamConfig.defaultSpringBootBomVersion}")
            mavenBom("org.springframework.cloud:spring-cloud-dependencies:${xtreamConfig.defaultSpringCloudBomVersion}")
        }

        dependencies {
            // 其他依赖版本都由上面的 mavenBom 控制
            // 这里指定 mavenBom 中没有包含的依赖版本
            dependency("io.github.classgraph:classgraph:4.8.174")
            dependency("org.bouncycastle:bcprov-jdk18on:1.78.1")
            dependency("pro.chenggang:mybatis-r2dbc-spring:3.0.5.RELEASE")
            dependency("cn.mybatis-mp:mybatis-mp-spring-boot-starter:1.7.8-spring-boot3")
            dependency("cn.mybatis-mp:mybatis-mp-datasource-routing:1.0.2")
            dependency("com.clickhouse:clickhouse-jdbc:0.7.2")
            dependency("com.clickhouse:clickhouse-client:0.7.1")
            dependency("com.clickhouse:clickhouse-r2dbc:0.7.1")
            dependency("io.minio:minio:8.5.14")
            dependency("com.lmax:disr


#!/usr/bin/env python3
"""
Demo script for temporal symptom modeling.

This demonstrates how the temporal module tracks symptom progression
and uses pattern matching to improve diagnosis accuracy.
"""

from pathlib import Path
import importlib.util

# Import temporal module directly to avoid __init__ dependency issues
def import_temporal_module():
    """Import temporal module directly from file."""
    spec = importlib.util.spec_from_file_location(
        'temporal_module',
        Path(__file__).parent / 'phaita' / 'models' / 'temporal_module.py'
    )
    module = importlib.util.module_from_spec(spec)
    spec.loader.exec_module(module)
    return module

temporal_module = import_temporal_module()
SymptomTimeline = temporal_module.SymptomTimeline
TemporalPatternMatcher = temporal_module.TemporalPatternMatcher
TemporalSymptomEncoder = temporal_module.TemporalSymptomEncoder

def _get_score_indicator(score):
    """Return visual indicator for score quality."""
    if score > 1.2:
        return "🟢 Excellent match"
    elif score > 1.0:
        return "🟡 Good match"
    elif score == 1.0:
        return "⚪ Neutral"
    elif score > 0.8:
        return "🟠 Weak match"
    else:
        return "🔴 Poor match"

print("=" * 70)
print("PHAITA Temporal Symptom Modeling Demo")
print("=" * 70)
print()

# Demo 1: SymptomTimeline
print("📋 Demo 1: Symptom Timeline Tracking")
print("-" * 70)

timeline = SymptomTimeline()
print("Patient presents with symptoms over time:")
print()

# Add symptoms as they appeared
symptoms_over_time = [
    ("fever", 0, "3 days ago"),
    ("cough", 36, "2 days ago"),
    ("chest_pain", 48, "1.5 days ago"),
    ("dyspnea", 72, "This morning"),
]

for symptom, hours, description in symptoms_over_time:
    timeline.add_symptom(symptom, hours)
    print(f"  • {symptom.replace('_', ' ').title()}: {description} ({hours}h ago)")

print()
print("Chronological progression (earliest → latest):")
progression = timeline.get_progression_pattern()
for symptom, hours in progression:
    print(f"  {hours}h: {symptom.replace('_', ' ')}")

print()

# Demo 2: Pattern Matching
print("🔍 Demo 2: Temporal Pattern Matching")
print("-" * 70)
import yaml

# Load temporal patterns
patterns_path = Path(__file__).parent / "config" / "temporal_patterns.yaml"
with open(patterns_path) as f:
    patterns = yaml.safe_load(f)

matcher = TemporalPatternMatcher(patterns)

print("Testing patient timeline against known conditions:")
print()

# Test against different conditions
conditions_to_test = [
    ("J18.9", "Pneumonia"),
    ("J45.9", "Asthma"),
    ("J44.9", "COPD"),
    ("J20.9", "Acute Bronchitis"),
]

scores = []
for code, name in conditions_to_test:
    score = matcher.score_timeline(timeline, code)
    scores.append((name, score, code))
    print(f"  {name:25} Score: {score:.3f}  {_get_score_indicator(score)}")

print()
print("Interpretation:")
print("  • Score > 1.0: Good temporal match (symptoms appeared in expected order)")
print("  • Score = 1.0: Neutral (no pattern defined or insufficient data)")
print("  • Score < 1.0: Poor match (symptoms appeared in wrong order/timing)")
print()

# Show best match
best_match = max(scores, key=lambda x: x[1])
print(f"🎯 Best temporal match: {best_match[0]} (score: {best_match[1]:.3f})")
print()

# Demo 3: Expected progression for best match
print(f"📊 Demo 3: Expected Progression for {best_match[0]}")
print("-" * 70)

expected = patterns[best_match[2]]["typical_progression"]
print("Typical symptom progression:")
for event in expected:
    symptom = event["symptom"].replace("_", " ").title()
    onset = event["onset_hour"]
    if onset == 0:
        print(f"  Hour 0: {symptom} (initial symptom)")
    else:
        print(f"  +{onset}h: {symptom}")

print()

# Demo 4: LSTM Encoder (if torch available)
print("🧠 Demo 4: LSTM Temporal Encoder")
print("-" * 70)

try:
    import torch

    # Create encoder
    encoder = TemporalSymptomEncoder(
        symptom_vocab_size=100,
        symptom_embedding_dim=32,
        hidden_dim=64,
        num_layers=2,
    )

    # Create sample data (batch of 2 patients)
    batch_size = 2
    seq_len = 4

    # Random symptom indices and timestamps
    symptom_indices = torch.randint(0, 100, (batch_size, seq_len))
    timestamps = torch.tensor([
        [0.0, 12.0, 24.0, 48.0],  # Patient 1
        [0.0, 6.0, 12.0, 24.0],   # Patient 2
    ])

    # Encode sequences
    embeddings = encoder(symptom_indices, timestamps)

    print("LSTM en


去成为她想成为的那个人。她对博士、对生命、对大地有着许多疑问，深知并非所有问题都有答案，但她不会停止探索的脚步。

她的盾牌由故乡最坚固的石棺盖改造而成，寓意着守护死者度过漫长岁月，在干涸时提供庇护。盾牌上的宝石显著增强了她的法术，同时也加剧了她克制能力的挑战。

在罗德岛，菲莱以重装干员的身份参与任务，她的法术在战斗中表现为强大的防御和一定程度的控制能力，例如能让沙虫枯萎死亡。她也乐于分享故乡的神话故事和习俗，比如新年时将贡品倒入河中感谢恩泽，或是萨尔贡河流不眷恋某一处绿洲的俗语。然而，她明确表示，如果一切重来，她仍愿选择与罗德岛众人同舟共济，因为她相信博士对此有更深刻的体悟。

菲莱的故事是一场关于寻找自我、调和矛盾和理解生命意义的苦旅。她以自身的经历证明，即使被烙上与主流信仰不符的印记，萨卡兹也能心怀善良，用看似矛盾的力量，守护她所珍视的生命。
## 剧情高光
被神官长发现并用“生命之河”的河水救活，那是她第一次感到心脏如此有力地跳动。
尽管从未被允许进入神庙，却作为神庙守卫，坚守职责多年。
在大洪水灾难中，及时发现异常并带领神官和民众撤离，拯救了整个聚落的生命。她由此开始反思生命与枯萎的关系。
在风雨中驾驶小船，带着发光的棺材盾牌出现，从洪水中救起罗德岛干员，让他们误认为是河流女神或死神的使者。
加入罗德岛时，她对重逢的回应：“既然我们都在为这片大地上的生灵而奔走，那就终将汇流到一起去。”
在晋升记录中，讲述了她第一次尝试让种子发芽失败的故事，并反思自己无法滋养生命，但可以守护生命。她坚定地表示，知道自己想要成为怎样的萨卡兹、怎样的人。
## 战斗表现
菲莱在剧情中展现了


 "Don't rename parameters of overridden methods.",
    "categories": [
      "documentationCommentMaintenance"
    ],
    "state": "stable",
    "incompatible": [],
    "sets": [
      "recommended",
      "flutter"
    ],
    "fixStatus": "hasFix",
    "details": "**DON'T** rename parameters of overridden methods.\n\nMethods that override another method, but do not have their own documentation\ncomment, will inherit the overridden method's comment when `dart doc` produces\ndocumentation. If the inherited method contains the name of the parameter (in\nsquare brackets), then `dart doc` cannot link it correctly.\n\n**BAD:**\n```dart\nabstract class A {\n  m(a);\n}\n\nabstract class B extends A {\n  m(b);\n}\n```\n\n**GOOD:**\n```dart\nabstract class A {\n  m(a);\n}\n\nabstract class B extends A {\n  m(a);\n}\n```",
    "sinceDartSdk": "2.0"
  },
  {
    "name": "avoid_return_types_on_setters",
    "description": "Avoid return types on setters.",
    "categories": [
      "brevity",
      "style"
    ],
    "state": "stable",
    "incompatible": [],
    "sets": [
      "recommended",
      "flutter"
    ],
    "fixStatus": "hasFix",
    "details": "**AVOID** return types on setters.\n\nAs setters do not return a value, declaring the return type of one is redundant.\n\n**BAD:**\n```dart\nvoid set speed(int ms);\n```\n\n**GOOD:**\n```dart\nset speed(int ms);\n```",
    "sinceDartSdk": "2.0"
  },
  {
    "name": "avoid_returning_null",
    "description": "Avoid returning null from members whose return type is bool, double, int, or num.",
    "categories": [],
    "state": "removed",
    "incompatible": [],
    "sets": [],
    "fixStatus": "noFix",
    "details": "NOTE: This rule is removed in Dart 3.3.0; it is no longer functional.\n\n**AVOID** returning null from members whose return type is bool, double, int,\nor num.\n\nFunctions that return primitive types such as bool, double, int, and num are\ngenerally expected to return non-nullable values.  Thus, returning null where a\nprimitive type was expected can lead to runtime exceptions.\n\n**BAD:**\n```dart\nbool getBool() => null;\nnum getNum() => null;\nint getInt() => null;\ndouble getDouble() => null;\n```\n\n**GOOD:**\n```dart\nbool getBool() => false;\nnum getNum() => -1;\nint getInt() => -1;\ndouble getDouble() => -1.0;\n```",
    "sinceDartSdk": "2.0"
  },
  {
    "name": "avoid_returning_null_for_future",
    "description": "Avoid returning null for Future.",
    "categories": [],
    "state": "removed",
    "incompatible": [],
    "sets": [],
    "fixStatus": "noFix",
    "details": "NOTE: This rule is removed in Dart 3.3.0; it is no longer functional.\n\n**AVOID** returning null for Future.\n\nIt is almost always wrong to return `null` for a `Future`.  Most of the time the\ndeveloper simply forgot to put an `async` keyword on the function.",
    "sinceDartSdk": "2.1"
  },
  {
    "name": "avoid_returning_null_for_void",
    "description": "Avoid returning `null` for `void`.",
    "categories": [
      "style"
    ],
    "state": "stable",


x0000008

gUnk_0888B910:: @ 0888B910
	.incbin "baserom.gba", 0x88B910, 0x0000030

gUnk_0888B940:: @ 0888B940
	.incbin "baserom.gba", 0x88B940, 0x0000064

gUnk_0888B9A4:: @ 0888B9A4
	.incbin "baserom.gba", 0x88B9A4, 0x0000008

gUnk_0888B9AC:: @ 0888B9AC
	.incbin "baserom.gba", 0x88B9AC, 0x00001B0

gUnk_0888BB5C:: @ 0888BB5C
	.incbin "baserom.gba", 0x88BB5C, 0x0000080

gUnk_0888BBDC:: @ 0888BBDC
	.incbin "baserom.gba", 0x88BBDC, 0x0000008

gUnk_0888BBE4:: @ 0888BBE4
	.incbin "baserom.gba", 0x88BBE4, 0x000017C

gUnk_0888BD60:: @ 0888BD60
	.incbin "baserom.gba", 0x88BD60, 0x0000024

gUnk_0888BD84:: @ 0888BD84
	.incbin "baserom.gba", 0x88BD84, 0x0000008

gUnk_0888BD8C:: @ 0888BD8C
	.incbin "baserom.gba", 0x88BD8C, 0x0000130

gUnk_0888BEBC:: @ 0888BEBC
	.incbin "baserom.gba", 0x88BEBC, 0x00000D8

gUnk_0888BF94:: @ 0888BF94
	.incbin "baserom.gba", 0x88BF94, 0x0000008

gUnk_0888BF9C:: @ 0888BF9C
	.incbin "baserom.gba", 0x88BF9C, 0x0000068

gUnk_0888C004:: @ 0888C004
	.incbin "baserom.gba", 0x88C004, 0x00000E8

gUnk_0888C0EC:: @ 0888C0EC
	.incbin "baserom.gba", 0x88C0EC, 0x0000008

gUnk_0888C0F4:: @ 0888C0F4
	.incbin "baserom.gba", 0x88C0F4, 0x00001F0

gUnk_0888C2E4:: @ 0888C2E4
	.incbin "baserom.gba", 0x88C2E4, 0x000008D

gUnk_0888C371:: @ 0888C371
	.incbin "baserom.gba", 0x88C371, 0x00001CB

gUnk_0888C53C:: @ 0888C53C
	.incbin "baserom.gba", 0x88C53C, 0x0000008

gUnk_0888C544:: @ 0888C544
	.incbin "baserom.gba", 0x88C544, 0x0000038

gUnk_0888C57C:: @ 0888C57C
	.incbin "baserom.gba", 0x88C57C, 0x0000008

gUnk_0888C584:: @ 0888C584
	.incbin "baserom.gba", 0x88C584, 0x0000008

gUnk_0888C58C:: @ 0888C58C
	.incbin "baserom.gba", 0x88C58C, 0x00001A0

gUnk_0888C72C:: @ 0888C72C
	.incbin "baserom.gba", 0x88C72C, 0x00007C0

gUnk_0888CEEC:: @ 0888C


/*-
 * Copyright (c) 1991 The Regents of the University of California.
 * All rights reserved.
 *
 * This code is derived from software contributed to Berkeley by
 * Computer Consoles Inc.
 *
 * %sccs.include.proprietary.c%
 */

#ifndef lint
	.asciz "@(#)l_gt_s.s	5.2 (Berkeley) 04/12/91"
#endif /* not lint */

.data
.text
LL0:.align	1
.globl	_l_gt
.set	MASK__,0x4
.data
.text
_l_gt:.word	MASK__
	movl	4(fp),r0		/* a */
	movl	8(fp),r1		/* b */
	cmpl	12(fp),16(fp)		/* if (la <= lb) */
	jgtr	LB
	movl	12(fp), r2		/* compare acc


CHECKREG r7, 0x0C8533A0;

	imm32 r0, 0xb567891b;
	imm32 r1, 0x2b89abbd;
	imm32 r2, 0x34b45b15;
	imm32 r3, 0x466bb717;
	imm32 r4, 0x556bb91b;
	imm32 r5, 0x67b9ab1d;
	imm32 r6, 0x7b4455b5;
	imm32 r7, 0xb666777b;
	R0 = R2 +|+ R0, R7 = R2 -|- R0 (ASR);
	R1 = R2 +|+ R1, R6 = R2 -|- R1 (ASR);
	R2 = R2 +|+ R2, R5 = R2 -|- R2 (ASR);
	R3 = R2 +|+ R3, R4 = R2 -|- R3 (ASL);
	R4 = R2 +|+ R4, R3 = R2 -|- R4 (ASR);
	R5 = R2 +|+ R5, R2 = R2 -|- R5 (ASR);
	R6 = R2 +|+ R6, R1 = R2 -|- R6 (ASL);
	R7 = R2 +|+ R7, R0 = R2 -|- R7 (ASR);
	CHECKREG r0, 0xED5Ae246;
	CHECKREG r1, 0x2B8AaBBC;
	CHECKREG r2, 0x1A5A2D8A;
	CHECKREG r3, 0x2C11098C;
	CHECKREG r4, 0x08A35188;
	CHECKREG r5, 0x1A5A2D8A;
	CHECKREG r6, 0x3DDE0A6C;
	CHECKREG r7, 0x2D004B43;

	imm32 r0, 0xbc678c11;
	imm32 r1, 0x27c9cb1d;
	imm32 r2, 0x344c5515;
	imm32 r3, 0x46c6c717;
	imm32 r4, 0x55678c1b;
	imm32 r5, 0x6c89abcd;
	imm32 r6, 0x7444551c;
	imm32 r7, 0x8c667777;
	R0 = R3 +|+ R0, R7 = R3 -|- R0 (ASL);
	R1 = R3 +|+ R1, R6 = R3 -|- R1 (ASR);
	R2 = R3 +|+ R2, R5 = R3 -|- R2 (ASR);
	R3 = R3 +|+ R3, R4 = R3 -|- R3 (ASR);
	R4 = R3 +|+ R4, R3 = R3 -|- R4 (ASL);
	R5 = R3 +|+ R5, R2 = R3 -|- R5 (ASR);
	R6 = R3 +|+ R6, R1 = R3 -|- R6 (ASR);
	R7 = R3 +|+ R7, R0 = R3 -|- R7 (ASL);
	CHECKREG r0, 0xF19C3044;
	CHECKREG r1, 0xbF07C818;
	CHECKREG r2, 0xC227eA96;
	CHECKREG r3, 0x8D8C8E2E;
	CHECKREG r4, 0x8D8C8E2E;
	CHECKREG r5, 0xCB64a397;
	CHECKREG r6, 0xCE85C615;
	CHECKREG r7, 0x44940874;

	imm32 r0, 0xd56789d1;
	imm32 r1, 0x2d89abdd;
	imm32 r2, 0x34d455d5;
	imm32 r3, 0x4d667717;
	imm32 r4, 0x5dd7891b;
	imm32 r5, 0x6789ab1d;
	imm32 r6, 0xd44d5515;
	imm32 r7, 0xd666


#0x4
	add     r0, r0, r7
	add     r0, r0, r5
	bl      Function_2236924
	cmp     r0, #0x0
	beq     branch_2235480
	.hword  0x1c76 @ add r6, r6, #0x1
.thumb
branch_2235480: @ 2235480 :thumb
	.hword  0x1c64 @ add r4, r4, #0x1
	add     r5, #0x50
	cmp     r4, #0x1e
	blt     branch_2235466
	mov     r0, #0x96
	lsl     r0, r0, #4
	add     r7, r7, r0
	ldr     r0, [sp, #0x4]
	.hword  0x1c40 @ add r0, r0, #0x1
	str     r0, [sp, #0x4]
	cmp     r0, #0xe
	blt     branch_2235462
	cmp     r6, #0x6
	bge     branch_22354a2
	add     sp, #0xc
	mov     r0, #0x5
	pop     {r4-r7,pc}
@ 0x22354a2

.thumb
branch_22354a2: @ 22354a2 :thumb
	ldr     r0, [sp, #0x8]
	bl      Function_202f028
	cmp     r0, #0x0
	beq     branch_22354b2
	add     sp, #0xc
	mov     r0, #0x6
	pop     {r4-r7,pc}
@ 0x22354b2

.thumb
branch_22354b2: @ 22354b2 :thumb
	mov     r0, #0x0
	add     sp, #0xc
	pop     {r4-r7,pc}
@ 0x22354b8

.word 0x2a300 @ 0x22354b8
.word 0x15180 @ 0x22354bc
.word 0xe880 @ 0x22354c0

.thumb
Function_22354c4: @ 22354c4 :thumb
	push    {r3-r5,lr}
	mov     r5, r0
	mov     r4, r1
	ldr     r1, [r5, #0x4]
	cmp     r1, #0x0
	beq     branch_2235500
	bl      Function_2234ecc
	mov     r0, #0x1
	bl      Function_2002b20
	ldr     r0, [pc, #0x44] @ 0x2235520, (=Unknown_223eab8)
	lsl     r1, r4, #2
	ldr     r0, [r0, r1]
	mov     r1, #0x46
	lsl     r1, r1, #4
	str     r0, [r5, r1]
	mov     r0, r1
	sub     r1, #0x34
	mov     r2, #0x1
	add     r0, #0x10
	str     r2, [r5, r0]
	mov     r0, r5
	add     r1, r5, r1
	mov     r2, #0x18
	bl      Function_2233dd0
	mov     r0, #0x0
	str     r0, [r5, #0x4]
	b       branch_223551a
@ 0x2235500

.thumb
branch_2235500: @ 2235500 :thumb
	ldr     r0, [pc, #0x20] @ 0x2235524, (=0x474)
	ldr     r0, [r5, r0]
	lsl     r0, r0, #24
	lsr     r0, r0, #24
	bl      Function_201d724
	cmp     r0, #0x0
	bne     branch_223551a


ree];
            }
            if(typeof dTree === "undefined"){
                layer.msg("方法获取失败，请检查ID或对象传递是否正确",{icon:2});
                return ;
            }
            return dTree.getAllParentParam(id);
        },
        getChildParam: function(dTree, id){  // 获取参数的全部下级节点
            if(typeof dTree === "string"){
                dTree = DTrees[dTree];
            }
            if(typeof dTree === "undefined"){
                layer.msg("方法获取失败，请检查ID或对象传递是否正确",{icon:2});
                return ;
            }
            return dTree.getChildParam(id);
        },
        getCheckbarNodesParam: function(dTree){  // 获取复选框选中值
            if(typeof dTree === "string"){
                dTree = DTrees[dTree];
            }
            if(typeof dTree === "undefined"){
                layer.msg("方法获取失败，请检查ID或对象传递是否正确",{icon:2});
                return {};
            }
            return dTree.getCheckbarNodesParam();	// 获取复选框选中值
        },
        getCheckbarJsonArrParam: function(dTree){  // 获取复选框选中值
        	if(typeof dTree === "string"){
        		dTree = DTrees[dTree];
        	}
        	if(typeof dTree === "undefined"){
        		layer.msg("方法获取失败，请检查ID或对象传递是否正确",{icon:2});
        		return {};
        	}
        	return dTree.getCheckbarJsonArrParam();	// 获取复选框选中值
        },
        dataInit: function(dTree, chooseId){  // 初始化选中树，针对数据反选
            if(typeof dTree === "string"){
                dTree = DTrees[dTree];
            }
            if(typeof dTree === "undefined"){
                layer.msg("方法获取失败，请检查ID或对象传递是否正确",{icon:2});
                return ;
            }
            if(chooseId){
                return dTree.dataInit(chooseId);
            }
        },
        chooseDataInit: function(dTree, chooseIds){	// 初始化复选框选中，针对数据反选
            if(typeof dTree === "string"){
                dTree = DTrees[dTree];
            }
            if(typeof dTree === "undefined"){
                layer.msg("方法获取失败，请检查ID或对象传递是否正确",{icon:2});
                return ;
            }
            if(chooseIds){
                return dTree.chooseDataInit(chooseIds);
            }
        },
        changeCheckbarNodes: function(dTree){	//判断复选框是否发生变更
            if(typeof dTree === "string"){
                dTree = DTrees[dTree];
            }
            if(typeof dTree === "undefined"){
                layer.msg("方法获取失败，请检查ID或对象传递是否正确",{icon:2});
                return ;
            }
            return dTree.changeCheckbarNodes();
        },
        initNoAllCheck: function(dTree) { //复选框半选状态初始化设置
            if(typeof dTree === "string"){
                dTree = DTrees[dTree];
            }
            if(typeof dTree === "undefined"){
                layer.msg("方法获取失败，请检查ID或对象传递是否正确",{icon:2});
                return ;
            }
            return dTree.initNoAllCheck();
        },
        initAllCheck: function(dTree){ // �


        //
        // For the final term, use the same approach as for the second. Since there is no global
        // upper bound, there is no analogue to the third term, ¬(c ⊆ z), involving d.

        let mut literals = match self.take() {
            Formula::And(l) => l,
            form => vec![form],
        };

        let mut aa = vec![];
        let mut bb = vec![];
        let mut cc = vec![];
        let mut dd = vec![];

        literals.retain(|form| {
            // At this stage, any formula involving `z` is a subset relation (or its negation)
            // that fits one of the patterns below.
            match *form {
                // a ⊆ z
                Formula::SubsetEq { sub: a, sup } if sup == z => aa.push(a),
                // z ⊆ b
                Formula::SubsetEq { sub, sup: b } if sub == z => bb.push(b),
                // ¬(c ⊆ z)
                Formula::Not(box Formula::SubsetEq { sub: c, sup }) if sup == z => {
                    cc.push(c)
                }
                // ¬(z ⊆ d)
                Formula::Not(box Formula::SubsetEq { sub, sup: d }) if sub == z => {
                    dd.push(d)
                }

                // Formulas that don't involve `z` can be moved outside the quantifier unchanged.
                // Leave them as-is.
                _ => {
                    debug_assert!(!form.has_var(z));
                    return true;
                }
            }

            false
        });

        macro_rules! mk_product {
            ($lower:ident, $upper:ident, $func:expr) => {
                literals.extend($lower.iter().cartesian_product($upper.iter()).map($func))
            };
        }

        // a ⊆ b
        mk_product!(aa, bb, |(&a, &b)| subeq(a, b));

        // ¬(c ⊆ a)
        mk_product!(cc, aa, |(&c, &a)| !subeq(c, a));

        // ¬(b ⊆ d)
        mk_product!(bb, dd, |(&b, &d)| !subeq(b, d));

        // We only need to add the ¬(c ⊆ ∅) constraint if a is empty. Otherwise it follows
        // trivially from the second `mk_product`.
        if aa.is_empty() {
            literals.extend(cc.iter().map(|&c| !empty(c)));
        }

        let ret = match literals.len() {
            0 => true.into(),
            1 => literals.pop().unwrap(),
            _ => Formula::And(literals),
        };

        *self = ret;
    }
}
<reponame>celinval/rmc-dev
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0 OR MIT

mod utils;
use utils::libc;

use std::cmp;
use std::convert::TryFrom;
use std::fmt;
use std::hash::{Hash, Hasher};
use std::iter::FromIterator;
use std::mem;
use std::ops::{Deref, DerefMut, FnMut, Index, IndexMut};
use std::ptr::{drop_in_place, read};
use std::slice;

// __CPROVER_max_malloc_size is dependent on the number of offset bits used to
// represent a pointer variable. By default, this is chosen to be 56, in which
// case the max_malloc_size is 2 ** (offset_bits - 1). We could go as far as to
// assign the default capacity to be the max_malloc_size but that would


// SPDX-FileCopyrightText: 2023 Efabless Corporation

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at

//      http://www.apache.org/licenses/LICENSE-2.0

// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include <firmware_apis.h>

void main(){
    // Enable managment gpio as output to use as indicator for finishing configuration
    ManagmentGpio_outputEnable();
    ManagmentGpio_write(0);
    enableHkSpi(0); // disable housekeeping spi
    // configure all gpios as  user out then chenge gpios from 32 to 37 before loading this configurations
    GPIOs_configureAll(GPIO_MODE_USER_STD_OUT_MONITORED);
    GPIOs_configure(32,GPIO_MODE_MGMT_STD_OUTPUT);
    GPIOs_configure(33,GPIO_MODE_MGMT_STD_OUTPUT);
    GPIOs_configure(34,GPIO_MODE_MGMT_STD_OUTPUT);
    GPIOs_configure(35,GPIO_MODE_MGMT_STD_OUTPUT);
    GPIOs_configure(36,GPIO_MODE_MGMT_STD_OUTPUT);
    GPIOs_configure(37,GPIO_MODE_MGMT_STD_OUTPUT);
    GPIOs_loadConfigs(); // load the configuration
    // reset counter
    LogicAnalyzer_outputEnable(2,0xFFFFFFFD);
    LogicAnalyzer_write(2,2);
    LogicAnalyzer_write(2,0);

    ManagmentGpio_write(1); // configuration finished
    // configure la 65 (reset enable by la) as output from cpu
    // writing 1 in bit 65(second bit in reg 2) to reset
    // asset reset
    LogicAnalyzer_write(2,2);
    LogicAnalyzer_inputEnable(2,0x2);
    LogicAnalyzer_outputEnable(2,0xFFFFFFFD);
    // deassert reset
    LogicAnalyzer_inputEnable(2,0);
    LogicAnalyzer_outputEnable(2,0xFFFFFFFF);

    return;
}


}

	if found {
		ro.readIndexQueue = ro.readIndexQueue[i:]
		for _, rs := range rss {
			delete(ro.pendingReadIndex, string(rs.req.Entries[0].Data))
		}
		if len(ro.readIndexQueue) == 0 {
			ro.readIndexQueue = ro.buf
		} else {
			left := cap(ro.readIndexQueue) - len(ro.readIndexQueue)
			if cap(ro.readIndexQueue) > 2*cap(ro.buf) && cap(ro.readIndexQueue) < 1024 {
				ro.buf = make([][]byte, 0, cap(ro.readIndexQueue))
			}
			if len(ro.readIndexQueue) < cap(ro.buf)/2 &&
				left < 1+cap(ro.readIndexQueue)/8 {
				tmp := ro.readIndexQueue
				ro.readIndexQueue = ro.buf
				ro.readIndexQueue = append(ro.readIndexQueue, tmp...)
			}
		}
		return rss
	}

	return nil
}

// lastPendingRequestCtx returns the context of the last pending read only
// request in readonly struct.
func (ro *readOnly) lastPendingRequestCtx() []byte {
	if len(ro.readIndexQueue) == 0 {
		return empty
	}
	return ro.readIndexQueue[len(ro.readIndexQueue)-1]
}
// Copyright 2015 The etcd Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package raft

import (
	"bytes"
	"errors"
	"fmt"
	"math"
	"math/rand"
	"sort"
	"strings"
	"sync"
	"time"

	pb "github.com/youzan/ZanRedisDB/raft/raftpb"
)

// None is a placeholder node ID used when there is no leader.
const None uint64 = 0
const noLimit = math.MaxUint64

// Possible values for StateType.
const (
	StateFollower StateType = iota
	StateCandidate
	StateLeader
	StatePreCandidate
	numStates
)

type ReadOnlyOption int

const (
	// ReadOnlySafe guarantees the linearizability of the read only request by
	// communicating with the quorum. It is the default and suggested option.
	ReadOnlySafe ReadOnlyOption = iota
	// ReadOnlyLeaseBased ensures linearizability of the read only request by
	// relying on the leader lease. It can be affected by clock drift.
	// If the clock drift is unbounded, leader might keep the lease longer than it
	// should (clock can move backward/pause without any bound). ReadIndex is not safe
	// in that case.
	ReadOnlyLeaseBased
)

// Possible values for CampaignType
const (
	// campaignPreElection represents the first phase of a normal election when
	// Config.PreVote is true.
	campaignPreElection CampaignType = "CampaignPreElection"
	// campaignElection represents a normal (time-based) election (the second phase
	// of the election when Config.PreVote is true).
	campaignElection CampaignType = "CampaignElection"
	// campaignTransfer represents the type of leader transfer
	campaignTransfer CampaignType = "CampaignTransfer"
)

// lockedRand is a small wrapper around rand.Rand to provide
// synchronization. Only the methods needed by the code are exposed
// (e.g. Intn).
type lockedRand struct {
	mu   sync.Mutex
	rand *rand.Rand
}

func (r *lockedRand) Intn(n int) int {


}}, `{}`, false},

		{"contentMatch", ContentKind, Rule{Enabled: true, Pattern: "b"}, `{"content":{"body":"abc"}}`, true},
		{"contentNoMatch", ContentKind, Rule{Enabled: true, Pattern: "d"}, `{"content":{"body":"abc"}}`, false},

		{"roomMatch", RoomKind, Rule{Enabled: true, RuleID: "!room@example.com"}, `{"room_id":"!room@example.com"}`, true},
		{"roomNoMatch", RoomKind, Rule{Enabled: true, RuleID: "!room@example.com"}, `{"room_id":"!otherroom@example.com"}`, false},

		{"senderMatch", SenderKind, Rule{Enabled: true, RuleID: "@user@example.com"}, `{"sender":"@user@example.com"}`, true},
		{"senderNoMatch", SenderKind, Rule{Enabled: true, RuleID: "@user@example.com"}, `{"sender":"@otheruser@example.com"}`, false},
	}
	for _, tst := range tsts {
		t.Run(tst.Name, func(t *testing.T) {
			got, err := ruleMatches(&tst.Rule, tst.Kind, mustEventFromJSON(t, tst.EventJSON), nil)
			if err != nil {
				t.Fatalf("ruleMatches failed: %v", err)
			}
			if got != tst.Want {
				t.Errorf("ruleMatches: got %v, want %v", got, tst.Want)
			}
		})
	}
}

func TestConditionMatches(t *testing.T) {
	tsts := []struct {
		Name      string
		Cond      Condition
		EventJSON string
		Want      bool
	}{
		{"empty", Condition{}, `{}`, false},
		{"empty", Condition{Kind: "unknownstring"}, `{}`, false},

		{"eventMatch", Condition{Kind: EventMatchCondition, Key: "content"}, `{"content":{}}`, true},

		{"displayNameNoMatch", Condition{Kind: ContainsDisplayNameCondition}, `{"content":{"body":"something without displayname"}}`, false},
		{"displayNameMatch", Condition{Kind: ContainsDisplayNameCondition}, `{"content":{"body":"hello Dear User, how are you?"}}`, true},

		{"roomMemberCountLessNoMatch", Condition{Kind: RoomMemberCountCondition, Is: "<2"}, `{}`, false},
		{"roomMemberCountLessMatch", Condition{Kind: RoomMemberCountCondition, Is: "<3"}, `{}`, true},
		{"roomMemberCountLessEqualNoMatch", Condition{Kind: RoomMemberCountCondition, Is: "<=1"}, `{}`, false},
		{"roomMemberCountLessEqualMatch", Condition{Kind: RoomMemberCountCondition, Is: "<=2"}, `{}`, true},
		{"roomMemberCountEqualNoMatch", Condition{Kind: RoomMemberCountCondition, Is: "==1"}, `{}`, false},
		{"roomMemberCountEqualMatch", Condition{Kind: RoomMemberCountCondition, Is: "==2"}, `{}`, true},
		{"roomMemberCountGreaterEqualNoMatch", Condition{Kind: RoomMemberCountCondition, Is: ">=3"}, `{}`, false},
		{"roomMemberCountGreaterEqualMatch", Condition{Kind: RoomMemberCountCondition, Is: ">=2"}, `{}`, true},
		{"roomMemberCountGreaterNoMatch", Condition{Kind: RoomMemberCountCondition, Is: ">2"}, `{}`, false},
		{"roomMemberCountGreaterMatch", Condition{Kind: RoomMemberCountCondition, Is: ">1"}, `{}`, true},

		{"senderNotificationPermissionMatch", Condition{Kind: SenderNotificationPermissionCondition, Key: "powerlevel"}, `{"sender":"@poweruser:example.com"}`, true},
		{"senderNotificationPermissionNoMatch", Condition{Kind: SenderNotificationPermissionCondition, Key: "powerlevel"}, `{"sender":"@nobody:example.com"}`, false},
	}
	for _, tst := range tsts {
		t.Run(tst.Name, func(t *testing.T) {
			got, err := conditionMatches(&tst.


//
// Copyright 2016 Pixar
//
// Licensed under the terms set forth in the LICENSE.txt file available at
// https://openusd.org/license.
//
#ifndef PXR_USD_SDF_TOKENS_H
#define PXR_USD_SDF_TOKENS_H

#include "pxr/pxr.h"
#include "pxr/usd/sdf/api.h"
#include "pxr/base/tf/staticTokens.h"

PXR_NAMESPACE_OPEN_SCOPE

// Miscellaneous Tokens
#define SDF_TOKENS                                      \
    ((AnyTypeToken, "__AnyType__"))

TF_DECLARE_PUBLIC_TOKENS(SdfTokens, SDF_API, SDF_TOKENS);

#define SDF_PATH_ABSOLUTE_INDICATOR_CHAR '/'
#define SDF_PATH_ABSOLUTE_INDICATOR_STR "/"
#define SDF_PATH_RELATIVE_ROOT_CHAR '.'
#define SDF_PATH_RELATIVE_ROOT_STR "."
#define SDF_PATH_CHILD_DELIMITER_CHAR '/'
#define SDF_PATH_CHILD_DELIMITER_STR "/"
#define SDF_PATH_NS_DELIMITER_CHAR ':'
#define SDF_PATH_NS_DELIMITER_STR ":"
#define SDF_PATH_RELATIONSHIP_TARGET_START_CHAR '['
#define SDF_PATH_RELATIONSHIP_TARGET_START_STR "["
#define SDF_PATH_RELATIONSHIP_TARGET_END_CHAR ']'
#define SDF_PATH_RELATIONSHIP_TARGET_END_STR "]"
#define SDF_PATH_PROPERTY_DELIMITER_CHAR '.'
#define SDF_PATH_PROPERTY_DELIMITER_STR "."

#define SDF_PATH_TOKENS                                                 \
    ((absoluteIndicator, SDF_PATH_ABSOLUTE_INDICATOR_STR))              \
    ((relativeRoot, SDF_PATH_RELATIVE_ROOT_STR))                        \
    ((childDelimiter, SDF_PATH_CHILD_DELIMITER_STR))                    \
    ((propertyDelimiter, SDF_PATH_PROPERTY_DELIMITER_STR))              \
    ((relationshipTargetStart, SDF_PATH_RELATIONSHIP_TARGET_START_STR)) \
    ((relationshipTargetEnd, SDF_PATH_RELATIONSHIP_TARGET_END_STR))     \
    ((parentPathElement, ".."))                                         \
    ((mapperIndicator, "mapper"))                                       \
    ((expressionIndicator, "expression"))                               \
    ((mapperArgDelimiter, "."))                                         \
    ((namespaceDelimiter, SDF_PATH_NS_DELIMITER_STR))                   \
    ((empty, ""))

TF_DECLARE_PUBLIC_TOKENS(SdfPathTokens, SDF_API, SDF_PATH_TOKENS);

#define SDF_METADATA_DISPLAYGROUP_TOKENS              \
    ((core, ""))                                      \
    ((internal, "Internal"))                          \
    ((dmanip, "Direct Manip"))                        \
    ((pipeline, "Pipeline"))                          \
    ((symmetry, "Symmetry"))                          \
    ((ui, "User Interface"))

TF_DECLARE_PUBLIC_TOKENS(SdfMetadataDisplayGroupTokens,
                         SDF_API,
                         SDF_METADATA_DISPLAYGROUP_TOKENS);

PXR_NAMESPACE_CLOSE_SCOPE

#endif // PXR_USD_SDF_TOKENS_H


可以从远程发起。该漏洞利用方法已被公开，可能会被使用。 | [1]https://code-projects.org/
[2]https://github.com/iMayday-Yee/Vulnerability/issues/5
[3]https://vuldb.com/?ctiid.327905
[4]https://vuldb.com/?id.327905
[5]https://vuldb.com/?submit.671469
[6]https://github.com/iMayday-Yee/Vulnerability/issues/5 |
| 31 | CVE-2025-55903 | 8.3  | HIGH | 在Perfex CRM v3.3.1中存在一个HTML注入漏洞。应用程序未能对“账单地址”字段中的用户输入进行净化处理，该字段位于报价模块中。因此，可以在面向客户的文档中注入并呈现未经转义的任意HTML代码。 | [1]https://codecanyon.net/item/perfex-powerful-open-source-crm/14013737
[2]https://github.com/ajansha/CVE-2025-55903 |
| 32 | CVE-2025-61919 | 7.5  | HIGH | Rack 是一个模块化的 Ruby Web 服务器接口。在版本 2.2.20、3.1.18 和 3.2.3 之前，`Rack::Request#POST` 会将整个请求体读入内存，对于 `Content-Type: application/x-www-form-urlencoded` 类型的请求，调用 `rack.input.read(nil)` 时没有强制执行长度限制。因此，大型请求体可以在解析之前完全缓冲到进程内存中，导致通过内存耗尽引发拒绝服务（DoS）。用户应升级到 Rack 版本 2.2.20、3.1.18 或 3.2.3，这些版本使用 `query_parser.bytesize_limit` 强制执行表单参数限制，防止无限制地读取 `application/x-www-form-urlencoded` 请求体。此外，应在代理或 Web 服务器层（例如 Nginx 的 `client_max_body_size`，Apache 的 `LimitRequestBody`）强制执行严格的最大请求体大小限制。 | [1]https://github.com/rack/rack/commit/4e2c903991a790ee211a3021808ff4fd6fe82881
[2]https://github.com/rack/rack/commit/cbd541e8a3d0c5830a3c9a30d3718ce2e124f9db
[3]https://github.com/rack/rack/commit/e179614c4a653283286f5f046428cbb85f21146f
[4]https://github.com/rack/rack/security/advisories/GHSA-6xw4-3v39-52mm |
| 33 | CVE-2025-61920 | 7.5  | HIGH | Authl


l|
|**2025-01-16**|**Interpretable Droplet Digital PCR Assay for Trustworthy Molecular Diagnostics**|Yuanyuan Wei et.al.|[2501.09218](http://arxiv.org/abs/2501.09218)|null|
|**2025-01-15**|**Multimodal LLMs Can Reason about Aesthetics in Zero-Shot**|Ruixiang Jiang et.al.|[2501.09012](http://arxiv.org/abs/2501.09012)|**[link](https://github.com/songrise/mllm4art)**|
|**2025-01-15**|**The Devil is in Temporal Token: High Quality Video Reasoning Segmentation**|Sitong Gong et.al.|[2501.08549](http://arxiv.org/abs/2501.08549)|**[link](https://github.com/sitonggong/vrs-hq)**|
|**2025-01-14**|**LLaVA-ST: A Multimodal Large Language Model for Fine-Grained Spatial-Temporal Understanding**|Hongyu Li et.al.|[2501.08282](http://arxiv.org/abs/2501.08282)|**[link](https://github.com/appletea233/llava-st)**|
|**2025-01-14**|**Facial Dynamics in Video: Instruction Tuning for Improved Facial Expression Perception and Contextual Awareness**|Jiaxing Zhao et.al.|[2501.07978](http://arxiv.org/abs/2501.07978)|**[link](https://github.com/jiaxing-star/facialdynamic)**|
|**2025-01-14**|**Zero-shot Video Moment Retrieval via Off-the-shelf Multimodal Large Language Models**|Yifang Xu et.al.|[2501.07972](http://arxiv.org/abs/2501.07972)|null|
|**2025-01-14**|**3UR-LLM: An End-to-End Multimodal Large Language Model for 3D Scene Understanding**|Haomiao Xiong et.al.|[2501.07819](http://arxiv.org/abs/2501.07819)|**[link](https://github.com/hmxiong/3ur-llm)**|
|**2025-01-13**|**Imagine while Reasoning in Space: Multimodal Visualization-of-Thought**|Chengzu Li et.al.|[2501.07542](http://arxiv.org/abs/2501.07542)|null|
|**2025-01-13**|**Aligning First, Then Fusing: A Novel Weakly Supervised Multimodal Violence Detection Method**|Wenping Jin et.al.|[2501.07496](http://arxiv.org/abs/2501.07496)|**[link](https://github.com/xjpp2016/mavd)**|
|**2025-01-13**|**Dynamic Multimodal Fusion via Meta-Learning Towards Micro-Video Recommendation**|Han Liu et.al.|[2501.07110](http://arxiv.org/abs/2501.07110)|**[link](https://github.com/hanliu95/metammf)**|
|**2025-01-13**|**LEO: Boosting Mixture of Vision Encoders for Multimodal Large Language Models**|Mozhgan Nasr Azadani et.al.|[2501.06986](http://arxiv.org/abs/2501.06986)|**[link](https://github.com/mozhgan91/leo)**|
|**2025-01-12**|**X-LeBench: A Benchmark for Extremely Long Egocentric Video Understanding**|Wenqi Zhou et.al.|[2501.06835](http://arxiv.org/abs/2501.06835)|null|
|**2025-01-12**|**GeoPix: Multi-Modal Large Language Model for Pixel-level Image Understanding in Remote Sensing**|Ruizhe Ou et.al.|[2501.06828](http://arxiv.org/abs/2501.06828)|null|
|**2025-01-12**|**MTPareto: A MultiModal Target


   tmp = tmp - yy - TMP;
    pmin = dpsim1 - tmp;
  }
  else {

    double dpsim2 = -arma::datum::inf;

    int j21, j22;

    #ifdef _OPENMP
    #pragma omp parallel for schedule(static) shared(S, dpsim2, N) private(j21, j22)
    #endif
    for (j21 = 0; j21 < N-1; j21++) {
      for (j22 = j21+1; j22 < N; j22++) {

        double tmp = inner_exact(j21, j22, S);
        if (tmp > dpsim2) {

          #ifdef _OPENMP
          #pragma omp atomic write
          #endif
          dpsim2 = tmp;
        }
      }
    }
    pmin = dpsim1 - dpsim2;
  }
  for (int ff = 0; ff < N; ff++) {
    S(ff,ff) = -arma::datum::inf;
  }

  pmax = S.max();

  std::vector<double> min_max;
  min_max.push_back(pmin);
  min_max.push_back(pmax);

  return min_max;
}


float> >(uint64_t* state,
                                                                                uint64_t stream) {
  return std::complex<float>(RandomToTypeNormal<float>(state, stream), RandomToTypeNormal<float>(state, stream));
}
template <>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::complex<double> RandomToTypeNormal<std::complex<double> >(uint64_t* state,
                                                                                uint64_t stream) {
  return std::complex<double>(RandomToTypeNormal<double>(state, stream), RandomToTypeNormal<double>(state, stream));
}

template <typename T>
class NormalRandomGenerator {
 public:
  static constexpr bool PacketAccess = true;

  // Uses the given "seed" if non-zero, otherwise uses a random seed.
  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NormalRandomGenerator(uint64_t seed = 0) {
    m_state = PCG_XSH_RS_state(seed);
#ifdef EIGEN_USE_SYCL
    // In SYCL it is not possible to build PCG_XSH_RS_state in one step.
    // Therefore, we need two steps to initializate the m_state.
    // IN SYCL, the constructor of the functor is s called on the CPU
    // and we get the clock seed here from the CPU. However, This seed is
    // the same for all the thread. As unlike CUDA, the thread.ID, BlockID, etc is not a global function.
    // and only  available on the Operator() function (which is called on the GPU).
    // Therefore, the thread Id injection is not available at this stage. However when the operator()
    // is called the thread ID will be available. So inside the operator,
    // we add the thrreadID, BlockId,... (which is equivalent of i)
    // to the seed and construct the unique m_state per thead similar to cuda.
    m_exec_once = false;
#endif
  }
  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NormalRandomGenerator(const NormalRandomGenerator& other) {
    m_state = other.m_state;
#ifdef EIGEN_USE_SYCL
    m_exec_once = other.m_exec_once;
#endif
  }

  template <typename Index>
  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T operator()(Index i) const {
#ifdef EIGEN_USE_SYCL
    if (!m_exec_once) {
      // This is the second stage of adding thread Id to the CPU clock seed and build unique seed per thread
      m_state += (i * 6364136223846793005ULL);
      m_exec_once = true;
    }
#endif
    T result = RandomToTypeNormal<T>(&m_state, i);
    return result;
  }

  template <typename Packet, typename Index>
  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(Index i) const {
    const int packetSize = internal::unpacket_traits<Packet>::size;
    EIGEN_ALIGN_MAX T values[packetSize];
#ifdef EIGEN_USE_SYCL
    if (!m_exec_once) {
      // This is the second stage of adding thread Id to the CPU clock seed and build unique seed per thread
      m_state += (i * 6364136223846793005ULL);
      m_exec_once = true;
    }
#endif
    EIGEN_UNROLL_LOOP
    for (int j = 0; j < packetSize; ++j) {
      values[j] = RandomToTypeNormal<T>(&m_state, i);
    }
    return internal::pload<Packet>(values);
  }

 private:
  mutable uint64_t m_state;
#ifdef EIGEN_USE_SYCL
  mutable bool m_exec_once;
#endif
};

template <typename Scalar>
struct functor_traits<NormalRandomGenerator<Scalar> > {
  enum {
    // On average, we need to generate about 3 random numbers
    // 15 mul, 8 add, 1.5 logs
    Cost = 3 * functor_traits<UniformRandomGenerator<Scalar> >::Cost + 15 * NumTraits<Scalar>::AddCost +
           8 * NumTraits<Scalar>::AddCost + 3 * functor_traits<scalar_log_op<Scalar> >::Cost / 2,
    PacketAccess = NormalRandomGenerator<Scalar>::PacketAccess
  };
};

}  // end namespace internal
}  // end namespace Eigen

#endif  // EIGEN_CXX11_TENSOR_TENSOR_RANDOM_H


atorDigits, int used) {
    int x = xDigits[i];
    if (x == 0) return _isIntrinsified ? 2 : 1;
    int j = 2 * i;
    int carry = 0;
    int xl = x & _halfDigitMask;
    int xh = x >> _halfDigitBits;
    int ph = 2 * xh * xl;
    int pl = xl * xl +
        ((ph & _halfDigitMask) << _halfDigitBits) +
        acculumatorDigits[j];
    carry = (pl >> _digitBits) + (ph >> _halfDigitBits) + xh * xh;
    acculumatorDigits[j] = pl & _digitMask;
    x <<= 1;
    xl = x & _halfDigitMask;
    xh = x >> _halfDigitBits;
    int n = used - i - 1;
    int k = i + 1;
    j++;
    while (--n >= 0) {
      int l = xDigits[k] & _halfDigitMask;
      int h = xDigits[k++] >> _halfDigitBits;
      int ph = xh * l + h * xl;
      int pl = xl * l +
          ((ph & _halfDigitMask) << _halfDigitBits) +
          acculumatorDigits[j] +
          carry;
      carry = (pl >> _digitBits) + (ph >> _halfDigitBits) + xh * h;
      acculumatorDigits[j++] = pl & _digitMask;
    }
    carry += acculumatorDigits[i + used];
    if (carry >= _digitBase) {
      acculumatorDigits[i + used] = carry - _digitBase;
      acculumatorDigits[i + used + 1] = 1;
    } else {
      acculumatorDigits[i + used] = carry;
    }
    return _isIntrinsified ? 2 : 1;
  }

  /// Multiplication operator.
  _BigIntImpl operator *(BigInt bigInt) {
    final other = _ensureSystemBigInt(bigInt, 'bigInt');
    var used = _used;
    var otherUsed = other._used;
    if (used == 0 || otherUsed == 0) {
      return zero;
    }
    var resultUsed = used + otherUsed;
    var digits = _digits;
    var otherDigits = other._digits;
    var resultDigits = _newDigits(resultUsed);
    var i = 0;
    while (i < otherUsed) {
      i += _mulAdd(otherDigits, i, digits, 0, resultDigits, i, used);
    }
    return new _BigIntImpl._(
        _isNegative != other._isNegative, resultUsed, resultDigits);
  }

  // resultDigits[0..resultUsed-1] =
  //     xDigits[0..xUsed-1]*otherDigits[0..otherUsed-1].
  // Returns resultUsed = xUsed + otherUsed.
  static int _mulDigits(Uint32List xDigits, int xUsed, Uint32List otherDigits,
      int otherUsed, Uint32List resultDigits) {
    var resultUsed = xUsed + otherUsed;
    var i = resultUsed + (resultUsed & 1);
    assert(resultDigits.length >= i);
    while (--i >= 0) {
      resultDigits[i] = 0;
    }
    i = 0;
    while (i < otherUsed) {
      i += _mulAdd(otherDigits, i, xDigits, 0, resultDigits, i, xUsed);
    }
    return resultUsed;
  }

  // resultDigits[0..resultUsed-1] = xDigits[0..xUsed-1]^2.
  // Returns resultUsed = 2*xUsed.
  static int _sqrDigits(
      Uint32List xDigits, int xUsed, Uint32List resultDigits) {
    var resultUsed = 2 * xUsed;
    assert(resultDigits.length >=


processLauncher('serve-sdk-docs').runStreamedDartCommand([
    'pub',
    'global',
    'run',
    'dhttpd',
    '--port',
    '8000',
    '--path',
    _sdkDocsDir.path,
  ]);
}

bool _serveReady = false;

Future<void> _serveDocsFrom(String servePath, int port, String context) async {
  print('launching dhttpd on port $port for $context');
  var launcher = SubprocessLauncher(context);
  if (!_serveReady) {
    await launcher.runStreamedDartCommand(['pub', 'get']);
    await launcher
        .runStreamedDartCommand(['pub', 'global', 'activate', 'dhttpd']);
    _serveReady = true;
  }
  await launcher.runStreamedDartCommand([
    'pub',
    'global',
    'run',
    'dhttpd',
    '--port',
    '$port',
    '--path',
    servePath
  ]);
}

Future<void> serveTestingPackageDocs() async {
  var outputPath = await docTestingPackage();
  print('launching dhttpd on port 8002 for SDK');
  var launcher = SubprocessLauncher('serve-test-package-docs');
  await launcher.runStreamed(Platform.resolvedExecutable, [
    'pub',
    'global',
    'run',
    'dhttpd',
    '--port',
    '8002',
    '--path',
    outputPath,
  ]);
}

Future<void> runTest() async {
  await analyzeTestPackages();
  await SubprocessLauncher('dart run test')
      .runStreamedDartCommand(['--enable-asserts', 'run', 'test']);
}

Future<void> runTryPublish() async {
  await SubprocessLauncher('try-publish')
      .runStreamed(Platform.resolvedExecutable, ['pub', 'publish', '-n']);
}

Future<void> runValidate(ArgResults commandResults) async {
  for (var target in commandResults.rest) {
    await switch (target) {
      'build' => validateBuild(),
      'dartdoc-docs' => validateDartdocDocs(),
      'format' => validateFormat(),
      'sdk-docs' => validateSdkDocs(),
      _ => throw UnimplementedError('Unknown validation target: "$target"'),
    };
  }
}

Future<void> validateBuild() async {
  var originalFileContents = <String, String>{};
  var differentFiles = <String>[];

  // Load original file contents into memory before running the builder; it
  // modifies them in place.
  for (var relPath in _generatedFilesList) {
    var origPath = path.joinAll(['lib', relPath]);
    var oldVersion = File(origPath);
    if (oldVersion.existsSync()) {
      originalFileContents[relPath] = oldVersion.readAsStringSync();
    }
  }

  await buildAll();

  for (var relPath in _generatedFilesList) {
    var newVersion = File(path.join('lib', relPath));
    if (!newVersion.existsSync()) {
      print('${newVersion.path} does not exist\n');
      differentFiles.add(relPath);
    } else {
      var newVersionText = await newVersion.readAsString();
      if (originalFileContents[relPath] != newVersionText) {
        print('${newVersion.path} has changed to: \n$newVersionText)');
        differentFiles.add(relPath);
      }
    }
  }

  if (differentFiles.isNotEmpty) {
    throw StateError('''
The following generated files needed to be rebuilt:
  ${differentFiles.map((f) => path.join('lib', f)).join("\n  ")}
Rebuild them with "dart tool/task.dart build" and check t


RE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

using System;
using NuGet;

namespace ICSharpCode.PackageManagement
{
	public interface ISharpDevelopProjectManager : IProjectManager
	{
		IPackagePathResolver PathResolver { get; }
		bool IsInstalled(string packageId);
		bool HasOlderPackageInstalled(IPackage package);
	}
}


s,.x-html strike,.x-html del{text-decoration:line-through;}.x-html hr{border:1px inset;}.x-html ol,.x-html ul,.x-html dir,.x-html menu,.x-html dd{margin-left:40px;}.x-html ul,.x-html menu,.x-html dir{list-style-type:disc;}.x-html ol{list-style-type:decimal;}.x-html ol ul,.x-html ul ol,.x-html ul ul,.x-html ol ol{margin-top:0;margin-bottom:0;}.x-html u,.x-html ins{text-decoration:underline;}.x-html br:before{content:"\A";}.x-html :before,.x-html :after{white-space:pre-line;}.x-html center{text-align:center;}.x-html :link,.x-html :visited{text-decoration:underline;}.x-html :focus{outline:invert dotted thin;}.x-html BDO[DIR="ltr"]{direction:ltr;unicode-bidi:bidi-override;}.x-html BDO[DIR="rtl"]{direction:rtl;unicode-bidi:bidi-override;}.iScroll ::-webkit-scrollbar,.iScroll::-webkit-scrollbar{width:6px;height:9px;}.iScroll ::-webkit-scrollbar-button:start:decrement,.iScroll ::-webkit-scrollbar-button:end:increment,.iScroll::-webkit-scrollbar-button:start:decrement,.iScroll::-webkit-scrollbar-button:end:increment{display:block;height:0;background-color:transparent;}.iScroll ::-webkit-scrollbar-track-piece,.iScroll::-webkit-scrollbar-track-piece{margin:10px 0;-webkit-border-radius:0;-webkit-border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;}.iScroll ::-webkit-scrollbar-thumb:vertical,.iScroll::-webkit-scrollbar-thumb:vertical{height:50px;background-color:rgba(0,0,0,0.12);-webkit-border-radius:4px;}.iScroll ::-webkit-scrollbar-thumb:horizontal,.iScroll::-webkit-scrollbar-thumb:horizontal{width:50px;background-color:rgba(0,0,0,0.12);-webkit-border-radius:4px;}#treecontainer .iScroll ::-webkit-scrollbar-thumb:vertical,#treecontainer .iScroll::-webkit-scrollbar-thumb:vertical{height:50px;background-color:rgba(0,0,0,0.06);-webkit-border-radius:4px;}.icon-pkg{background:url(../images/icons.png) no-repeat -3px -57px!important;}.icon-class{background:url(../images/icons.png) no-repeat -3px -84px!important;}.icon-singleton{background:url(../images/icons.png) no-repeat -3px -111px!important;}.icon-component{background:url(../images/icons.png) no-repeat -3px -137px!important;}.icon-guide{background:url(../images/icons.png) no-repeat -3px -7px!important;}.icon-event{background:url(../images/icons.png) no-repeat -3px -245px!important;}.icon-property{background:url(../images/icons.png) no-repeat -3px -192px!important;}.icon-method{background:url(../images/icons.png) no-repeat -3px -165px!important;}.icon-cfg{background:url(../images/icons.png) no-repeat -3px -219px!important;}.icon-subclass{background:url(../images/icons.png) no-repeat -3px -299px!important;}.icon-example{background:url(


*
   *

   * Required. Context about the user, what they are looking at and what action
   * they took to trigger the Recommend request. Note that this user event
   * detail won't be ingested to userEvent logs. Thus, a separate userEvent
   * write request is required for event logging.
   *
   * Don't set
   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id]
   * or
   * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1.UserInfo.user_id]
   * to the same fixed ID for different users. If you are trying to receive
   * non-personalized recommendations (not recommended; this can negatively
   * impact model performance), instead set
   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id]
   * to a random unique ID and leave
   * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1.UserInfo.user_id]
   * unset.
   *

   *
   *
   * .google.cloud.discoveryengine.v1.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED];
   *
   */
  com.google.cloud.discoveryengine.v1.UserEventOrBuilder getUserEventOrBuilder();

  /**
   *
   *
   *

   * Maximum number of results to return. Set this property
   * to the number of recommendation results needed. If zero, the service
   * chooses a reasonable default. The maximum allowed value is 100. Values
   * above 100 are set to 100.
   *

   *
   * int32 page_size = 3;
   *
   * @return The pageSize.
   */
  int getPageSize();

  /**
   *
   *
   *

   * Filter for restricting recommendation results with a length limit of 5,000
   * characters. Currently, only filter expressions on the `filter_tags`
   * attribute is supported.
   *
   *
   * Examples:
   *
   *  * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))`
   *  * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))`
   *
   * If `attributeFilteringSyntax` is set to true under the `params` field, then
   * attribute-based expressions are expected instead of the above described
   * tag-based syntax. Examples:
   *
   *  * (language: ANY("en", "es")) AND NOT (categories: ANY("Movie"))
   *  * (available: true) AND
   *    (language: ANY("en", "es")) OR (categories: ANY("Movie"))
   *
   * If your filter blocks all results, the API returns generic
   * (unfiltered) popular Documents. If you only want results strictly matching
   * the filters, set `strictFiltering` to `true` in
   * [RecommendRequest.params][google.cloud.discoveryengine.v1.RecommendRequest.params]
   * to receive empty results instead.
   *
   * Note that the API never returns
   * [Document][google.cloud.discoveryengine.v1.Document]s with `storageStatus`
   * as `EXPIRED` or `DELETED` regardless of filter choices.
   *

   *
   * string filter = 4;
   *
   * @return The filter.
   */
  java.lang.String getFilter();

  /**
   *
   *
   *

   * Filter for restricting recommendation results with a length limit of 5,000
   * characters. Currently, only filter expressions on the `filter_tags`
   * attribute is supported.
   *
   *
   * Examples:
   *
   *  * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))`
   *  * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))`
   *
   * If `at


igure.height
#define XExposeEventGetX(event) event->xexpose.x
#define XExposeEventGetY(event) event->xexpose.y
#define XExposeEventGetWidth(event) event->xexpose.width
#define XExposeEventGetHeight(event) event->xexpose.height
#define XButtonEventGetTime(event) (event->xbutton.time)
#define XButtonEventLChanged(event) (event->xbutton.button == Button1)
#define XButtonEventMChanged(event) (event->xbutton.button == Button2)
#define XButtonEventRChanged(event) (event->xbutton.button == Button3)
#define XButtonEventLIsDown(x) ((x)->xbutton.state & Button1Mask)
#define XButtonEventMIsDown(x) ((x)->xbutton.state & Button2Mask)
#define XButtonEventRIsDown(x) ((x)->xbutton.state & Button3Mask)
#define XButtonEventShiftIsDown(x) (x->xbutton.state & ShiftMask)
#define XButtonEventCtrlIsDown(x) (x->xbutton.state & ControlMask)
#define XButtonEventAltIsDown(x) (x->xbutton.state & Mod3Mask)
#define XButtonEventMetaIsDown(x) (x->xbutton.state & Mod1Mask)
#define XButtonEventGetX(event) (event->xbutton.x)
#define XButtonEventGetY(event) (event->xbutton.y)
#define XKeyEventGetTime(event) (event->xkey.time)
#define XKeyEventShiftIsDown(x) (x->xkey.state & ShiftMask)
#define XKeyEventCtrlIsDown(x) (x->xkey.state & ControlMask)
#define XKeyEventAltIsDown(x) (x->xkey.state & Mod3Mask)
#define XKeyEventMetaIsDown(x) (x->xkey.state & Mod1Mask)
#define XKeyEventGetX(event) (event->xkey.x)
#define XKeyEventGetY(event) (event->xkey.y)
#define XFontStructGetAscent(f) f->ascent
#endif

// ----------------------------------------------------------------------------
// Misc functions
// ----------------------------------------------------------------------------

bool wxDoSetShape( Display* xdisplay, Window xwindow, const wxRegion& region );

class WXDLLIMPEXP_CORE wxXVisualInfo
{
public:
    wxXVisualInfo();
    ~wxXVisualInfo();
    void Init( Display* dpy, XVisualInfo* visualInfo );

    int                   m_visualType;   // TrueColor, DirectColor etc.
    int                   m_visualDepth;
    int                   m_visualColormapSize;
    void                 *m_visualColormap;
    int                   m_visualScreen;
    unsigned long         m_visualRedMask;
    unsigned long         m_visualGreenMask;
    unsigned long         m_visualBlueMask;
    int                   m_visualRedShift;
    int                   m_visualGreenShift;
    int                   m_visualBlueShift;
    int                   m_visualRedPrec;
    int                   m_visualGreenPrec;
    int                   m_visualBluePrec;

    unsigned char        *m_colorCube;
};

bool wxFillXVisualInfo( wxXVisualInfo* vi, Display* dpy );

#endif // _WX_PRIVX_H_


rily unit vectors.
 *
 * **Origin:**
 *  This is the small part of gameofbombs.com portal system. It works.
 * @see PIXI.groupD8.E
 * @see PIXI.groupD8.SE
 * @see PIXI.groupD8.S
 * @see PIXI.groupD8.SW
 * @see PIXI.groupD8.W
 * @see PIXI.groupD8.NW
 * @see PIXI.groupD8.N
 * @see PIXI.groupD8.NE
 * @author Ivan @ivanpopelyshev
 * @namespace PIXI.groupD8
 * @memberof PIXI
 */
export const groupD8 = {
    /**
     * | Rotation | Direction |
     * |----------|-----------|
     * | 0°       | East      |
     * @readonly
     */
    E: 0,

    /**
     * | Rotation | Direction |
     * |----------|-----------|
     * | 45°↻     | Southeast |
     * @readonly
     */
    SE: 1,

    /**
     * | Rotation | Direction |
     * |----------|-----------|
     * | 90°↻     | South     |
     * @readonly
     */
    S: 2,

    /**
     * | Rotation | Direction |
     * |----------|-----------|
     * | 135°↻    | Southwest |
     * @readonly
     */
    SW: 3,

    /**
     * | Rotation | Direction |
     * |----------|-----------|
     * | 180°     | West      |
     * @readonly
     */
    W: 4,

    /**
     * | Rotation    | Direction    |
     * |-------------|--------------|
     * | -135°/225°↻ | Northwest    |
     * @readonly
     */
    NW: 5,

    /**
     * | Rotation    | Direction    |
     * |-------------|--------------|
     * | -90°/270°↻  | North        |
     * @readonly
     */
    N: 6,

    /**
     * | Rotation    | Direction    |
     * |-------------|--------------|
     * | -45°/315°↻  | Northeast    |
     * @readonly
     */
    NE: 7,

    /**
     * Reflection about Y-axis.
     * @readonly
     */
    MIRROR_VERTICAL: 8,

    /**
     * Reflection about the main diagonal.
     * @readonly
     */
    MAIN_DIAGONAL: 10,

    /**
     * Reflection about X-axis.
     * @readonly
     */
    MIRROR_HORIZONTAL: 12,

    /**
     * Reflection about reverse diagonal.
     * @readonly
     */
    REVERSE_DIAGONAL: 14,

    /**
     * @param {PIXI.GD8Symmetry} ind - sprite rotation angle.
     * @returns {PIXI.GD8Symmetry} The X-component of the U-axis
     *    after rotating the axes.
     */
    uX: (ind: GD8Symmetry): GD8Symmetry => ux[ind],

    /**
     * @param {PIXI.GD8Symmetry} ind - sprite rotation angle.
     * @returns {PIXI.GD8Symmetry} The Y-component of the U-axis
     *    after rotating the axes.
     */
    uY: (ind: GD8Symmetry): GD8Symmetry => uy[ind],

    /**
     * @param {PIXI.GD8Symmetry} ind - sprite rotation angle.
     * @returns {PIXI.GD8Symmetry} The X-component of the V-axis
     *    after rotating the axes.
     */
    vX: (ind: GD8Symmetry): GD8Symmetry => vx[ind],

    /**
     * @param {PIXI.GD8Symmetry} ind - sprite rotation angle.
     * @returns


    ///
    /// println!("RangeTo");
    /// let mut vec = squares.clone();
    /// assert!(vec.par_drain(..5).eq(squares[..5].par_iter().copied()));
    /// assert_eq!(&vec[..], &squares[5..]);
    /// assert!(vec.capacity() >= squares.len());
    ///
    /// println!("RangeToInclusive");
    /// let mut vec = squares.clone();
    /// assert!(vec.par_drain(..=5).eq(squares[..=5].par_iter().copied()));
    /// assert_eq!(&vec[..], &squares[6..]);
    /// assert!(vec.capacity() >= squares.len());
    ///
    /// println!("Range");
    /// let mut vec = squares.clone();
    /// assert!(vec.par_drain(3..7).eq(squares[3..7].par_iter().copied()));
    /// assert_eq!(&vec[..3], &squares[..3]);
    /// assert_eq!(&vec[3..], &squares[7..]);
    /// assert!(vec.capacity() >= squares.len());
    ///
    /// println!("RangeInclusive");
    /// let mut vec = squares.clone();
    /// assert!(vec.par_drain(3..=7).eq(squares[3..=7].par_iter().copied()));
    /// assert_eq!(&vec[..3], &squares[..3]);
    /// assert_eq!(&vec[3..], &squares[8..]);
    /// assert!(vec.capacity() >= squares.len());
    /// ```
    fn par_drain<R: RangeBounds<Idx>>(self, range: R) -> Self::Iter;
}

/// We hide the `Try` trait in a private module, as it's only meant to be a
/// stable clone of the standard library's `Try` trait, as yet unstable.
mod private {
    /// Clone of `std::ops::Try`.
    ///
    /// Implementing this trait is not permitted outside of `rayon`.
    pub trait Try {
        type Ok;
        type Error;
        fn into_result(self) -> Result<Self::Ok, Self::Error>;
        fn from_ok(v: Self::Ok) -> Self;
        fn from_error(v: Self::Error) -> Self;
    }

    impl<T> Try for Option<T> {
        type Error = ();
        type Ok = T;

        fn into_result(self) -> Result<T, ()> { self.ok_or(()) }

        fn from_ok(v: T) -> Self { Some(v) }

        fn from_error(_: ()) -> Self { None }
    }

    impl<T, E> Try for Result<T, E> {
        type Error = E;
        type Ok = T;

        fn into_result(self) -> Result<T, E> { self }

        fn from_ok(v: T) -> Self { Ok(v) }

        fn from_error(v: E) -> Self { Err(v) }
    }
}
use camera_controllers;
use gfx;
use gfx::state::Rasterizer;
use gfx::Primitive;
use slog::Logger;
use specs;
use specs::Entities;
use specs::{Read, ReadStorage};
use std::sync::{Arc, Mutex};
use vecmath;

use super::default_pipeline::pipe;
use super::mesh::MeshGuts;
use super::EncoderChannel;
use super::MeshRepository;
use super::Visual;
use crate::camera::DefaultCamera;
use crate::Spatial;

// System to render all visible entities. This is back-end agnostic;
// i.e. nothing in it should be tied to OpenGL, Vulkan, etc.

pub struct System<R: gfx::Resources, C: gfx::CommandBuffer<R>> {
    _log: Logger,
    // TODO: multiple PSOs
    pso: gfx::PipelineState<R, pipe::Meta>,
    mesh_repo: Arc<Mutex<MeshRepository<R>>>,
    encoder_channel: EncoderChannel<R, C>,
    output_color: gfx::handle::RenderTargetView<R, gfx::format::Srgba8>,
    output_


 {
        if self.units != other.units || self.bits != other.bits {
            return false
        }

        self.inner == other.inner
    }
}

pub struct Iter<'a, T: ReprUsize + 'a> {
    vec: &'a BitsVec<T>,
    range: Range<usize>,
}

impl<'a, T: ReprUsize> IntoIterator for &'a BitsVec<T> {
    type Item = T;
    type IntoIter = Iter<'a, T>;

    fn into_iter(self) -> Iter<'a, T> {
        self.iter()
    }
}

impl<'a, T: ReprUsize> Iterator for Iter<'a, T> {
    type Item = T;

    fn next(&mut self) -> Option<T> {
        self.range.next().map(|i| self.vec.get(i))
    }

    fn size_hint(&self) -> (usize, Option<usize>) {
        self.range.size_hint()
    }
}

impl<'a, T: ReprUsize> DoubleEndedIterator for Iter<'a, T> {
    fn next_back(&mut self) -> Option<T> {
        self.range.next_back().map(|i| self.vec.get(i))
    }
}

impl<'a, T: ReprUsize> ExactSizeIterator for Iter<'a, T> {}

pub struct IntoIter<T: ReprUsize> {
    vec: BitsVec<T>,
    range: Range<usize>,
}

impl<T: ReprUsize> IntoIterator for BitsVec<T> {
    type Item = T;
    type IntoIter = IntoIter<T>;

    fn into_iter(self) -> IntoIter<T> {
        self.into_iter()
    }
}

impl<T: ReprUsize> Iterator for IntoIter<T> {
    type Item = T;

    fn next(&mut self) -> Option<T> {
        self.range.next().map(|i| self.vec.get(i))
    }
}

impl<T: ReprUsize> DoubleEndedIterator for IntoIter<T> {
    fn next_back(&mut self) -> Option<T> {
        self.range.next_back().map(|i| self.vec.get(i))
    }
}

impl<T: ReprUsize> ExactSizeIterator for IntoIter<T> {}

#[cfg(test)]
mod tests {
    use super::{BitsVec, ReprUsize};
    use std::mem;

    #[repr(usize)]
    #[derive(Clone, Debug, Eq, PartialEq)]
    enum TestEnum {
        Value1,
        Value2,
        Value3,
        Value4,
    }

    impl ReprUsize for TestEnum {
        fn into_usize(self) -> usize { self as usize }
        fn from_usize(i: usize) -> Self { unsafe { mem::transmute(i) } }
    }

    #[test]
    fn test_everything_with_enum() {
        let mut vec = BitsVec::with_elements(4, 16, TestEnum::Value4);
        vec.set(0, TestEnum::Value1);
        vec.set(1, TestEnum::Value2);
        vec.set(2, TestEnum::Value3);
        assert_eq!(vec.len(), 16);
        assert_eq!(vec.inner_len(), 1);
        assert_eq!(vec.get(0), TestEnum::Value1);
        assert_eq!(vec.get(1), TestEnum::Value2);
        assert_eq!(vec.get(2), TestEnum::Value3);
        vec.push(TestEnum::Value4);
        for i in 3..vec.len() {
            assert_eq!(vec.get(i), TestEnum::Value4);
        }
    }

    #[test]
    fn test_truncate() {
        let mut vec = BitsVec::with_elements(7, 50, 13);
        vec.truncate(10);
        assert_eq!(vec.inner_len(), 2);
        assert_eq!(vec.get(9), 13);
        vec.push(25);
        as


/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>

  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
  arising from the use of this software.

  Permission is granted to anyone to use this software for any purpose,
  including commercial applications, and to alter it and redistribute it
  freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not
     claim that you wrote the original software. If you use this software
     in a product, an acknowledgment in the product documentation would be
     appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be
     misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_config.h"

#ifndef _SDL_uikitmodes_h
#define _SDL_uikitmodes_h

#include "SDL_uikitvideo.h"

typedef struct
{
    UIScreen *uiscreen;
    CGFloat scale;
} SDL_DisplayData;

typedef struct
{
    UIScreenMode *uiscreenmode;
    CGFloat scale;
} SDL_DisplayModeData;

extern BOOL SDL_UIKit_supports_multiple_displays;

extern SDL_bool UIKit_IsDisplayLandscape(UIScreen *uiscreen);

extern int UIKit_InitModes(_THIS);
extern void UIKit_GetDisplayModes(_THIS, SDL_VideoDisplay * display);
extern int UIKit_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode);
extern void UIKit_QuitModes(_THIS);

#endif /* _SDL_uikitmodes_h */

/* vi: set ts=4 sw=4 expandtab: */