(); i++ ) {
			if ( targets[i].GetEntity()->IsType( idStaticEntity::Type ) ) {
				turret = targets[i].GetEntity();
				break;
			}
		}
	} else {
		gameLocal.Warning( "idFuncMountedWeapon::Spawn:  Please target one model for a turret\n" );
	}
}

/*
===============================================================================

idPortalSky

===============================================================================
*/

CLASS_DECLARATION( idEntity, idPortalSky )
	EVENT( EV_PostSpawn,			idPortalSky::Event_PostSpawn )
	EVENT( EV_Activate,				idPortalSky::Event_Activate )
END_CLASS

/*
===============
idPortalSky::idPortalSky
===============
*/
idPortalSky::idPortalSky( void ) {

}

/*
===============
idPortalSky::~idPortalSky
===============
*/
idPortalSky::~idPortalSky( void ) {

}

/*
===============
idPortalSky::Spawn
===============
*/
void idPortalSky::Spawn( void ) {
	if ( !spawnArgs.GetBool( "triggered" ) ) {
		PostEventMS( &EV_PostSpawn, 1 );
	}
}

/*
================
idPortalSky::Event_PostSpawn
================
*/
void idPortalSky::Event_PostSpawn() {
	gameLocal.SetPortalSkyEnt( this );
}

/*
================
idPortalSky::Event_Activate
================
*/
void idPortalSky::Event_Activate( idEntity *activator ) {
	gameLocal.SetPortalSkyEnt( this );
}
#endif /* _D3XP */
/*
===========================================================================

Doom 3 GPL Source Code
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.

This file is part of the Doom 3 GPL Source Code ("Doom 3 Source Code").

Doom 3 Source Code is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Doom 3 Source Code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Doom 3 Source Code.  If not, see <http://www.gnu.org/licenses/>.

In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code.  If not, please request a copy in writing from id Software at the address below.

If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.

===========================================================================
*/

#include "sys/platform.h"
#include "framework/DeclEntityDef.h"
#include "renderer/ModelManager.h"

#include "Fx.h"

#include "BrittleFracture.h"

CLASS_DECLARATION( idEntity, idBrittleFracture )
	EVENT( EV_Activate, idBrittleFracture::Event_Activate )
	EVENT( EV_Touch, idBrittleFracture::Event_Touch )
END_C


5 },

        { "(cn:2.4.6.8.19:=\\5cJohn\\2a \\28Doe\\29)", extensible1 },

        { "(cn:dn:2.4.6.8.19:=\\5cJohn\\2a \\28Doe\\29)", extensible2 },

        { "(:dn:2.4.6.8.19:=\\5cJohn\\2a \\28Doe\\29)", extensible3 },

        { "(cn:dn:=\\5cJohn\\2a \\28Doe\\29)", extensible4 },

        { "(:2.4.6.8.19:=\\5cJohn\\2a \\28Doe\\29)", extensible5 },

        { "(&(objectClass=\\5ctest\\2a\\28Value\\29)(sn~=\\5ctest\\2a\\28Value\\29))",
            LDAPFilter.createANDFilter(list1) },

        { "(|(objectClass=\\5ctest\\2a\\28Value\\29)(sn~=\\5ctest\\2a\\28Value\\29))",
            LDAPFilter.createORFilter(list1) },

        { "(!(objectClass=\\5ctest\\2a\\28Value\\29))", LDAPFilter.createNOTFilter(equal) },

        { "(|(givenName=\\5cJo\\2a\\28\\29*\\5cn\\2a\\28\\29)(cn:2.4.6.8.19:=\\5cJohn\\2a \\28Doe\\29)" +
            "(&(objectClass=\\5ctest\\2a\\28Value\\29)(sn~=\\5ctest\\2a\\28Value\\29)))",
            LDAPFilter.createORFilter(list2) },

        // OpenDJ issue 23.
        {
            "(ds-sync-conflict=uid=\\5c+3904211775265,ou=SharedAddressBook,cn=1038372,dc=cab)",
            LDAPFilter.createEqualityFilter("ds-sync-conflict",
                    ByteString.valueOfUtf8("uid=\\+3904211775265,ou=SharedAddressBook,cn=1038372,dc=cab")) },

      // OPENDJ-735
      { "(&)", LDAPFilter.createANDFilter(new ArrayList<RawFilter>()) },

      // OPENDJ-735
      { "(|)", LDAPFilter.createORFilter(new ArrayList<RawFilter>()) }
    };
  }

  @Test(dataProvider = "filterstrings")
  public void testDecode(String filterStr, LDAPFilter filter) throws Exception
  {
    LDAPFilter decoded = LDAPFilter.decode(filterStr);
    assertEquals(decoded.toString(), filter.toString());
    assertEquals(decoded.getAssertionValue(), filter.getAssertionValue());
    assertEquals(decoded.getAttributeType(), filter.getAttributeType());
    assertEquals(decoded.getDNAttributes(), filter.getDNAttributes());
    if(decoded.getFilterComponents() != null || filter.getFilterComponents() != null)
    {
      assertEquals(decoded.getFilterComponents().toString(), filter.getFilterComponents().toString());
    }
    assertEquals(decoded.getFilterType(), filter.getFilterType());
    assertEquals(decoded.getMatchingRuleID(), filter.getMatchingRuleID());
    if(decoded.getNOTComponent() != null || filter.getNOTComponent() != null)
    {
      assertEquals(decoded.getNOTComponent().toString(), filter.getNOTComponent().toString());
    }
    if(isNotEmpty(decoded.getSubAnyElements()) || isNotEmpty(filter.getSubAnyElements()))
    {
      assertEquals(decoded.getSubAnyElements(), filter.getSubAnyElements());
    }
    if(isNotEmpty(decoded.getSubFinalElement()) || isNotEmpty(filter.getSubFinalElement()))
    {
      assertEquals(decoded.getSubFinalElement(), filter.getSubFinalElement());
    }
    if(isNotEmpty(decoded.getSubInitialElement()) || isNotEmpty(filter.getSubInitialElement()))
    {
      assertEquals(decoded.getSubInitialElement(), filter.getSubInitialElement());
    }
  }

  private boolean isNotEmpty(ByteString bs)
  {
    return bs != null && !bs.toString().equals("");
  }

  pr


Platform
:   Android
Vendor
:   Android Open Source Project
Feedback
:   https://issuetracker.google.com/issues/new?component=192708
Since
:   Initial
Affects
:   Kotlin and Java files
Editing
:   This check runs on the fly in the IDE editor
See
:   https://developer.android.com/reference/android/app/Fragment.html#Fragment()
Implementation
:   [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/FragmentDetector.kt)
Tests
:   [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/FragmentDetectorTest.kt)
Copyright Year
:   2012

From the Fragment documentation:
**Every** fragment must have an empty constructor, so it can be
instantiated when restoring its activity's state. It is strongly
recommended that subclasses do not have other constructors with
parameters, since these constructors will not be called when the
fragment is re-instantiated; instead, arguments can be supplied by the
caller with `setArguments(Bundle)` and later retrieved by the Fragment
with `getArguments()`.

Note that this is no longer true when you are using
`androidx.fragment.app.Fragment`; with the `FragmentFactory` you can
supply any arguments you want (as of version androidx version 1.1).

(##) Example

Here is an example of lint warnings produced by this check:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text
src/test/pkg/FragmentTest.java:10:Error: This fragment class should be
public (test.pkg.FragmentTest.Fragment1) [ValidFragment]
    private static class Fragment1 extends Fragment {
                         ---------
src/test/pkg/FragmentTest.java:15:Error: This fragment inner class
should be static (test.pkg.FragmentTest.Fragment2) [ValidFragment]
    public class Fragment2 extends Fragment {
                 ---------
src/test/pkg/FragmentTest.java:21:Error: The default constructor must be
public [ValidFragment]
    private Fragment3() {
            ---------
src/test/pkg/FragmentTest.java:26:Error: This fragment should provide a
default constructor (a public constructor with no arguments)
(test.pkg.FragmentTest.Fragment4) [ValidFragment]
    public static class Fragment4 extends Fragment {
                        ---------
src/test/pkg/FragmentTest.java:27:Error: Avoid non-default constructors
in fragments: use a default constructor plus
Fragment#setArguments(Bundle) instead [ValidFragment]
    private Fragment4(int sample) {
            ---------
src/test/pkg/FragmentTest.java:36:Error: Avoid non-default constructors
in fragments: use a default constructor plus
Fragment#setArguments(Bundle) instead [ValidFragment]
    public Fragment5(int sample) {
           ---------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Here is the source file referenced above:

`src/test/pkg/FragmentTest.java`:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers
package test.pkg;

import android.annotation.SuppressLint;
import android.app.Fragment;

@SuppressWarnings("unused")
public class FragmentTest {

    // Should be public
    private static class Fragment1 extends Fragment {

    }

    // Should be static
    public class Fragment2 extends Fragment {

    }

    // Should have a public constructor
    public static class Fragment3 extends Fragment {
        private Fragment3() {
        }
    }

    // Should have a public constructor with no arguments
    public static class Fragment4 extends Fragment {
        private Fragment4(int sample) {
        }
    }

    //


;; #LAYOUT# STD *       #TAKE
;; #LAYOUT# *   BASIC_0 #TAKE
;; #LAYOUT# *   *       #IGNORE

;
; Fetches an operator - for the expression parser
;
; Note: does not recognize unary operators
;

fetch_operator: ; XXX change the operator code to start from 0

	; Retrieve the next character

	jsr fetch_character

	; Check if within range

	sec
	sbc #$AA
	bcc fetch_operator_failed             ; branch if below 0

	cmp #$0A
	bcs fetch_operator_failed             ; branch if $0A or greater

	; Now we have to recognize '>=', '<=' and '<>' operators

	cmp #$07
	beq fetch_operator_try_gteq

	cmp #$09
	beq fetch_operator_try_lteq_neq

	; FALLTROUGH

fetch_operator_success:

	clc
	rts

fetch_operator_failed:

!ifndef HAS_OPCODES_65CE02 {
	jsr unconsume_character
} else {
	dew TXTPTR
}

	sec
	rts

fetch_operator_try_gteq:

	; Here we distinguish between '>


FileNotFoundError as e:
        print(str(e), file=sys.stderr)
        sys.exit(2)
    if settings.seed is not None:
        random.seed(settings.seed)
    backend = getattr(settings, "ui_backend", "terminal")
    if backend == "web":
        # Simple local server to host the web assets
        from .web_server import serve_web
        serve_web(port=int(getattr(settings, 'web_port', 8000)), open_browser=bool(getattr(settings, 'web_open', False)))
        return
    if backend == "tk":
        try:
            # Preflight to provide a clearer error if Tk isn't present
            import tkinter  # type: ignore
            from .backend.tk import run_tk
            run_tk(settings)
            return
        except Exception as e:
            print(f"Tk backend unavailable ({e}); falling back to terminal.", file=sys.stderr)
    # Default: terminal backend
    run_with_resize(settings)


tiqueta((int)numericUpDownCopias.Value, (int)numericUpDownAvancoEtq.Value);

                acbrEtq.IniciarEtiqueta();
                acbrEtq.ImprimirTexto(ETQOrientacao.orNormal, 2, 2, 2, 3, 3, "AMACIANTE AMACIEX 5 LTS", 0, true);
                acbrEtq.ImprimirTexto(ETQOrientacao.orNormal, 2, 2, 1, 8, 3, "MACIO MATRIX FIX");
                acbrEtq.ImprimirBarras(ETQOrientacao.orNormal, TipoCodBarra.barEAN13, 2, 2, 13, 5, "7898237690230", 10, ETQBarraExibeCodigo.becSIM);
                acbrEtq.ImprimirTexto(ETQOrientacao.orNormal, 3, 3, 2, 18, 35, "R$");
                acbrEtq.ImprimirTexto(ETQOrientacao.orNormal, 3, 4, 4, 15, 50, "8,60");
                acbrEtq.FinalizarEtiqueta((int)numericUpDownCopias.Value, (int)numericUpDownAvancoEtq.Value);
            }
            else
            {
                acbrEtq.IniciarEtiqueta();
                acbrEtq.ImprimirCaixa(3, 3, 90, 5, 5, 0);
                acbrEtq.ImprimirTexto(ETQOrientacao.orNormal, "T", 10, 10, 3, 3, "BISCOITO MARILAN RECH 335G", 0, true);
                acbrEtq.ImprimirTexto(ETQOrientacao.orNormal, "S", 10, 10, 8, 3, "CHOC BRANCO");
                acbrEtq.ImprimirBarras(ETQOrientacao.orNormal, TipoCodBarra.barEAN13, 2, 2, 13, 5, "7896003701685", 10, ETQBarraExibeCodigo.becSIM);
                acbrEtq.ImprimirTexto(ETQOrientacao.orNormal, "G", 40, 80, 18, 35, "R$");
                acbrEtq.ImprimirTexto(ETQOrientacao.orNormal, "G", 55, 100, 15, 50, "20,59");
                acbrEtq.FinalizarEtiqueta((int)numericUpDownCopias.Value, (int)numericUpDownAvancoEtq.Value);

                acbrEtq.IniciarEtiqueta();
                acbrEtq.ImprimirCaixa(3, 3, 90, 5, 5, 0);
                acbrEtq.ImprimirTexto(ETQOrientacao.orNormal, "T", 10, 10, 3, 3, "SABAO EM PO FLASH 1KG", 0, true);
                acbrEtq.ImprimirTexto(ETQOrientacao.orNormal, "S", 10, 10, 8, 3, "ADVANCED - UNIDADE");
                acbrEtq.ImprimirBarras(ETQOrientacao.orNormal, TipoCodBarra.barEAN13, 2, 2, 13, 5, "7898903097042", 10, ETQBarraExibeCodigo.becSIM);
                acbrEtq.ImprimirTexto(ETQOrientacao.orNormal, "G", 40, 80, 18, 35, "R$");
                acbrEtq.ImprimirTexto(ETQOrientacao.orNormal, "G", 55, 100, 15, 50, "3,18");
                acbrEtq.FinalizarEtiqueta((int)numericUpDownCopias.Value, (int)numericUpDownAvancoEtq.Value);

                acbrEtq.IniciarEtiqueta();
                acbrEtq.ImprimirCaixa(3, 3, 90, 5, 5, 0);
                acbrEtq.ImprimirTexto(ET


 *     myobj o;
 *     tbox.push(o);
 * }
 *
 * void thread_consumer(void) {
 *     myobj o;

 *     if (tbox.pop(o)) {
 *         o.test();
 *     }
 * }
 */

// The fiber_tbox2 has an object copying process in push/pop which is suitable
// for transfering the object managed by std::shared_ptr.

template<typename T>
class fiber_tbox2 {
public:
	/**
	 * 췽
	 */
	fiber_tbox2(void) : size_(0) {}

	~fiber_tbox2(void) {}

	/**
	 * ϢδѵϢ
	 */
	void clear(void) {
		tbox_.clear();
	}

	/**
	 * Ϣ
	 * @param t {T} Ϣ
	 * @param notify_first {bool} Ϊ trueڲϢ
	 *  ֪ͨʽȽ֪ͨʽ fiber_tbox2
	 *  ڱȽϳʱòΪ false Чʸߣ fiber_tbox2
	 *  ڽ϶(磺ȴߵ pop ֱ fiber_tbox2 ),
	 *  򱾲ӦΪ trueԱ push ߻ûȫǰ fiber_tbox2
	 *  ǰٶڴǷ
	 * @return {bool}
	 */
	bool push(T t, bool notify_first = true) {
		// ȼ
		if (mutex_.lock() == false) {
			abort();
		}

		// Ϣ
		tbox_.push_back(t);
		size_++;

		if (notify_first) {
			if (cond_.notify() == false) {
				abort();
			}
			if (mutex_.unlock() == false) {
				abort();
			}
			return true;
		} else {
			if (mutex_.unlock() == false) {
				abort();
			}
			if (cond_.notify() == false) {
				abort();
			}
			return true;
		}
	}

	/**
	 * Ϣ
	 * @param t {T&}   true ʱŽ
	 * @param wait_ms {int} >= 0 ʱõȴʱʱ(뼶)
	 *  ԶȴֱϢ
	 * @return {bool} ǷϢ
	 */
	bool pop(T& t, int wait_ms = -1) {
		if (mutex_.lock() == false) {
			abort();
		}
		while (true) {
			if (peek_obj(t)) {
				if (mutex_.unlock() == false) {
					abort();
				}
				return true;
			}

			if (!cond_.wait(mutex_, wait_ms) && wait_ms >= 0) {
				if (mutex_.unlock() == false) {
					abort();
				}
				return false;
			}
		}
	}

	/**
	 * صǰϢеϢ
	 * @return {size_t}
	 */
	size_t size(void) const {
		return size_;
	}

public:
	void lock(void) {
		if (mutex_.lock() == false) {
			abort();
		}
	}

	void unlock(void) {
		if (mutex_.unlock() == false) {
			abort();
		}
	}

private:
	fiber_tbox2(const fiber_tbox2&) {}
	const fiber_tbox2& operator=(const fiber_tbox2&);

private:
	std::list<T>  tbox_;
	size_t        size_;
	fiber_mutex   mutex_;
	fiber_cond    cond_;

	bool peek_obj(T& t) {
		typename std::list<T>::iterator it = tbox


import numpy as np
import matplotlib.pyplot as plt

m=1; k=1; dt=0.01; n_step=1000
v=0; x=1
v_vector = np.zeros(n_step)
x_vector = np.zeros(n_step)
for step in range(n_step):
    v = v + (dt/2) * (-k * x / m)
    x = x + dt * v
    v = v + (dt/2) * (-k * x / m)
    v_vector[step] = v
    x_vector[step] = x

plt.figure()
plt.plot(np.arange(1, n_step+1) * dt, x_vector, linewidth=2)
plt.plot(np.arange(1, n_step+1) * dt, v_vector, '--', linewidth=2)
plt.xlabel('time')
plt.ylabel('position or velocity')
plt.legend(['position', 'velocity'])
plt.tight_layout()
plt.savefig('fig-c01-position_and_momentum.pdf')
plt.close()

potential = 0.5 * k * x_vector**2
kinetic = 0.5 * m * v_vector**2

plt.figure()
plt.plot(np.arange(1, n_step+1) * dt, potential, linewidth=2)
plt.plot(np.arange(1, n_step+1) * dt, kinetic, '--', linewidth=2)
plt.plot(np.arange(1, n_step+1) * dt, potential + kinetic, '-.', linewidth=1)
plt.xlabel('time')
plt.ylabel('Energy')
plt.legend(['potential', 'kinetic', 'total'])
plt.tight_layout()
plt.savefig('fig-c01-energy_conservation.pdf')
plt.close()

plt.figure(figsize=(5,4.8))
plt.plot(x_vector, v_vector, '.', markersize=10)
plt.xlabel('position')
plt.ylabel('momentum')
plt.axis('equal')
plt.tight_layout()
plt.savefig('fig-c01-phase_space.pdf', dpi=200)
plt.close()


tch == "l" and "r" or "l"
        Yaw.ThisDelay = globals.realtime()
    end

    if entity.get_player_weapon(self) == nil then return end

    local using = false
    local anti_aim_on_use = false

    DefensiveExploit = globals.tickcount() % 5
    ui.set(GameSzensze[1],ui.get(Builder[i]["Enable"]))
    if ui.get(Builder[i]["Pitch"]) ~= '\aDCE7FFFFExploit' then
        ui.set(GameSzensze[2][1],ui.get(Builder[i]["Pitch"]))
        ui.set(GameSzensze[2][2],ui.get(Builder[i]["PitchVal"]))
    else
        if DefensiveExploit == 4 then
            ui.set(GameSzensze[2][1],"Up")
        else
            ui.set(GameSzensze[2][1],"Down")
        end
    end
    ui.set(GameSzensze[3],ui.get(Builder[i]["Yaw Base"]))
    if not returnthat then
    ui.set(GameSzensze[4][1],ui.get(Builder[i]["Yaw"]))
    if manualaa() == 1 then
        ui.set(GameSzensze[4][2],-90)
        ui.set(GameSzensze[6][1], "Static")
        ui.set(GameSzensze[5][1], "Off")
        ui.set(GameSzensze[5][2], 0)
    end
    if manualaa() == 2 then
        ui.set(GameSzensze[4][2],90)
        ui.set(GameSzensze[6][1], "Static")
        ui.set(GameSzensze[5][1], "Off")
        ui.set(GameSzensze[5][2], 0)
    end
    if manualaa() == 3 then
        ui.set(GameSzensze[4][2],180)
        ui.set(GameSzensze[6][1], "Static")
        ui.set(GameSzensze[5][1], "Off")
        ui.set(GameSzensze[5][2], 0)
    end
    if Yaw.JitterDelay+0.02<globals.realtime() then
        Yaw.JitterDsy = Yaw.JitterDsy == "l" and "r" or "l"
        Yaw.JitterDelay = globals.realtime()
    end
    if manualaa() == 0 then
        if ui.get(Builder[i]["YawOff"])== "Default" then
            ui.set(GameSzensze[4][2],ui.get(Builder[i]["YawOffVal"]))
        else
            ui.set(GameSzensze[4][2],Yaw.ThisSwitch == "l" and ui.get(Builder[i]["YawOffVal"]) or ui.get(Builder[i]["YawOffInv"]))
        end
    end

    doExpoit(i)
end

    if ui.get(Builder[i]["YawMod"]) ~= "X-Way" then
        ui.set(GameSzensze[5][1],ui.get(Builder[i]["YawMod"]))
        center = (ui.get(Builder[i]["ModAngle"]) + ui.get(Builder[i]["ModAngleInv"])) / 2
        if center > -180 and center < 180 then
            ui.set(GameSzensze[5][2],center)
        end
    else
        ui.set(GameSzensze[5][1],"Center")
        if Yaw.WayDelay+1/(ui.get(Builder[i]["WayHz"])) < globals.realtime() then
            Yaw.WaySwitch = Yaw.WaySwitch+1
            if Yaw.WaySwitch > ui.get(Builder[i]["Ways"]) then Yaw.WaySwitch = 1 end
            Yaw.WayDelay = globals.realtime()
        end
        ui.set(GameSzensze[5][2],ui.get(Builder[i]["Way"..Yaw.WaySwitch]))
    end

    ui.set(GameSzensze[6][1],ui.get(Builder[i]["BodyYaw"]))
    if ui.get


ESS)
    self.batch:addChild(rightWallSprite)
    local rightWallBody = self.world:createBoxBody(0, WALL_THICKNESS, display.height)
    rightWallBody:setFriction(WALL_FRICTION)
    rightWallBody:setElasticity(WALL_ELASTICITY)
    rightWallBody:bind(rightWallSprite)
    rightWallBody:setPosition(display.right - WALL_THICKNESS / 2, display.cy + WALL_THICKNESS)

    local bottomWallSprite = display.newSprite("#Wall.png")
    bottomWallSprite:setScaleX(display.width / WALL_THICKNESS)
    self.batch:addChild(bottomWallSprite)
    local bottomWallBody = self.world:createBoxBody(0, display.width, WALL_THICKNESS)
    bottomWallBody:setFriction(WALL_FRICTION)
    bottomWallBody:setElasticity(WALL_ELASTICITY)
    bottomWallBody:bind(bottomWallSprite)
    bottomWallBody:setPosition(display.cx, display.bottom + WALL_THICKNESS / 2)

    -- add debug node
    self.worldDebug = self.world:createDebugNode()
    self:addChild(self.worldDebug)
end

function MainScene:createCoin(x, y)
    -- add sprite to scene
    local coinSprite = display.newSprite("#Coin.png")
    self.batch:addChild(coinSprite)

    -- create body
    local coinBody = self.world:createCircleBody(COIN_MASS, COIN_RADIUS)
    coinBody:setFriction(COIN_FRICTION)
    coinBody:setElasticity(COIN_ELASTICITY)
    -- binding sprite to body
    coinBody:bind(coinSprite)
    -- set body position
    coinBody:setPosition(x, y)
end

function MainScene:onTouch(event, x, y)
    if event == "began" then
        self:createCoin(x, y)
    end
end

function MainScene:onEnter()
    self.layer:setTouchEnabled(true)
    -- make world running
    self.world:start()
end

return MainScene


:root {
  --julia-blue: #4063D8;
  --julia-purple: #9558B2;
  --julia-red: #CB3C33;
  --julia-green: #389826;

  --sintef-blue: #003c65;

  --vp-c-brand: #40a52f;
  --vp-c-brand-light: #3dd027;
  --vp-c-brand-lighter: #9499ff;
  --vp-c-brand-lightest: #bcc0ff;
  --vp-c-brand-dark: #535bf2;
  --vp-c-brand-darker: #454ce1;
  --vp-c-brand-dimm: #212425;
  --vp-tip-bg: rgb(254, 254, 254);
  /* Greens */
  --vp-dark-green: #00558e; /* Main accent green */
  --vp-dark-green-dark: #003c65;
  --vp-dark-green-light: #0075c3;
  --vp-dark-green-lighter: #007fd4;
  --vp-dark-green-dimm: #2e3834;

  /* Complementary Colors */
  --vp-dark-gray: #1e1e1e;
  --vp-dark-gray-soft: #2a2a2a;
  --vp-dark-gray-mute: #242424;
  --vp-light-gray: #d1d5db;

  /* Text Colors */
  --vp-dark-text: #e5e5e5; /* Primary text color */
  --vp-dark-subtext: #c1c1c1; /* Subtle text */

  /* Backgrounds */
  --vp-dark-bg: #121212; /* Main background */
  --vp-dark-bg-alt: #1a1a1a; /* Alternative background */
  --vp-dark-bg-dimm: #101010;

    /* Borders */
  --vp-dark-border: #00233a;
    /* custom tip */
  --vp-custom-block-tip-border: var(--vp-c-brand-darker);
  --vp-custom-block-tip-bg: var(--vp-tip-bg);
  /* button */
  --vp-button-brand-border: var(--vp-dark-green-dark);
  --vp-button-brand-bg: var(--vp-dark-green-dark);
  --vp-button-brand-hover-border: var(--vp-dark-green-dark);
  --vp-button-brand-hover-bg: var(--vp-dark-green);
  --vp-button-brand-active-border: var(--vp-dark-green-light);
  --vp-button-brand-active-bg: var(--vp-dark-green);
}

:root.dark {
  /* custom tip */
  --vp-custom-block-tip-border: var(--vp-dark-green-dark);
  --vp-custom-block-tip-text: var(--vp-dark-subtext);
  --vp-custom-block-tip-bg: var(--vp-dark-gray-mute);
}

/* Button */
:root.dark {
  --vp-button-brand-border: var(--vp-dark-green-light);
  --vp-button-brand-text: var(--vp-dark-text);
  --vp-button-brand-bg: var(--vp-dark-green);
  --vp-button-brand-hover-border: var(--vp-dark-green-lighter);
  --vp-button-brand-hover-text: var(--vp-dark-text);
  --vp-button-brand-hover-bg: var(--vp-dark-green-dark);
  --vp-button-brand-active-border: var(--vp-dark-green-light);
  --vp-button-brand-active-text: var(--vp-dark-text);
  --vp-button-brand-active-bg: var(--vp-dark-green);
}

/* Typography */
:root.dark {
  --vp-dar


font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:1.846;color:#666666;background-color:#ffffff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#2196f3;text-decoration:none}a:hover,a:focus{color:#0a6ebd;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:3px}.img-thumbnail{padding:4px;line-height:1.846;background-color:#ffffff;border:1px solid #dddddd;border-radius:3px;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:23px;margin-bottom:23px;border:0;border-top:1px solid #eeeeee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role="button"]{cursor:pointer}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:400;line-height:1.1;color:#444444}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#bbbbbb}h1,.h1,h2,.h2,h3,.h3{margin-top:23px;margin-bottom:11.5px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:11.5px;margin-bottom:11.5px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:56px}h2,.h2{font-size:45px}h3,.h3{font-size:34px}h4,.h4{font-size:24px}h5,.h5{font-size:20px}h6,.h6{font-size:14px}p{margin:0 0 11.5px}.lead{margin-bottom:23px;font-size:14px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:19.5px}}small,.small{font-size:92%}mark,.mark{padding:.2em;background-color:#ffe0b2}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transf


 permissions and
// limitations under the License.
'use strict';

/**
 * Expected Lighthouse audit values for perf tests.
 */
export default [
  {
    lhr: {
      requestedUrl: 'http://localhost:8081/lazy-load.html',
      finalUrl: 'http://localhost:8081/lazy-load.html',
      audits: {
        'ad-top-of-viewport': {
          score: 0,
          numericValue: 53,
          details: {
            items: [
              {
                slot: 'google_ads_iframe_/6355419/Travel_0',
              },
            ],
          },
        },
        'viewport-ad-density': {
          score: 1,
          numericValue: '.10 +/- .01',
        },
        'ads-in-viewport': {
          score: 0,
          numericValue: .6,
          details: {
            items: [
              {slot: 'google_ads_iframe_/6355419/Travel_6'},
              {slot: 'google_ads_iframe_/6355419/Travel_7'},
              {slot: 'google_ads_iframe_/6355419/Travel_8'},
              {slot: 'google_ads_iframe_/6355419/Travel_9'},
            ],
          },
        },
      },
    },
  },
];
// Copyright 2021 Google LLC
//
// 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.
'use strict';

/**
 * Expected Lighthouse audit values for perf tests.
 */
export default [
  {
    lhr: {
      requestedUrl: 'http://localhost:8081/deprecated-api-usage.html',
      finalUrl: 'http://localhost:8081/deprecated-api-usage.html',
      audits: {
        'deprecated-gpt-api-usage': {
          score: null,
          details: {
            items: [
              {
                source: 'console.warn',
                description: 'The googletag.pubads().definePassback ' +
                'function has been deprecated. The function may break in ' +
                'certain contexts, see ' +
                'https://developers.google.com/publisher-tag/guides/passback-tags#construct_passback_tags ' +
                'for how to correctly create a passback.',
                // Use a Regexp to ignore the version of pubads_impl.
                url: /.*securepubads.g.doubleclick.net.*pubads_impl.*/,
              },
            ],
          },
        },
      },
    },
  },
];
// Copyright 2021 Google LLC
//
// 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.
'use strict';

/**
 * Expected Lighthouse audit values for perf tests.
 */
export default [
  {
    lhr: {
      requestedUrl: 'http://localhost:8081/gpt-errors-overall.html',
      finalUrl: 'http://localhost:8081/gpt-errors-overall.html',
      audits: {
        'gpt-errors-overall': {
          score: null,
          details: {
            items: [


// BSD-style license that can be found in the LICENSE file.

library trydart.samples;

const String EXAMPLE_HELLO = r'''
// Go ahead and modify this example.

var greeting = "Hello, World!";

// Prints a greeting.
void main() {
  // The [print] function displays a message in the "Console" box.
  // Try modifying the greeting above and watch the "Console" box change.
  print(greeting);
}
''';

const String EXAMPLE_HELLO_HTML = r'''
// Go ahead and modify this example.

import "dart:html";

var greeting = "Hello, World!";

// Displays a greeting.
void main() {
  // This example uses HTML to display the greeting and it will appear
  // in a nested HTML frame (an iframe).
  document.body.append(new HeadingElement.h1()..appendText(greeting));
}
''';

const String EXAMPLE_FIBONACCI = r'''
// Go ahead and modify this example.

// Computes the nth Fibonacci number.
int fibonacci(int n) {
  if (n < 2) return n;
  return fibonacci(n - 1) + fibonacci(n - 2);
}

// Prints a Fibonacci number.
void main() {
  int i = 20;
  String message = "fibonacci($i) = ${fibonacci(i)}";
  // Print the result in the "Console" box.
  print(message);
}
''';

const String EXAMPLE_FIBONACCI_HTML = r'''
// Go ahead and modify this example.

import "dart:html";

// Computes the nth Fibonacci number.
int fibonacci(int n) {
  if (n < 2) return n;
  return fibonacci(n - 1) + fibonacci(n - 2);
}

// Displays a Fibonacci number.
void main() {
  int i = 20;
  String message = "fibonacci($i) = ${fibonacci(i)}";

  // This example uses HTML to display the result and it will appear
  // in a nested HTML frame (an iframe).
  document.body.append(new HeadingElement.h1()..appendText(message));
}
''';

// Test that math.png is displayed correctly (centered without 3d border).
// Test that slider works and changes size of sunflower.
const String EXAMPLE_SUNFLOWER = '''
// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

library sunflower;

import "dart:html";
import "dart:math";

const String SEED_COLOR = "orange";
const int SEED_RADIUS = 2;
const int SCALE_FACTOR = 4;
const num TAU = PI * 2;
const int MAX_D = 300;
const num centerX = MAX_D / 2;
const num centerY = centerX;

final InputElement slider = query("#slider");
final Element notes = query("#notes");
final num PHI = (sqrt(5) + 1) / 2;
int seeds = 0;
final CanvasRenderingContext2D context =
  (query("#canvas") as CanvasElement).context2D;

void main() {
  document.head.append(new StyleElement()..appendText(STYLE));
  document.body.innerHtml = BODY;
  ImageElement img = document.querySelector("#math_png");
  img.src = MATH_PNG;
  slider.onChange.listen((e) => draw());
  draw();
}

/// Draw the complete figure for the current number of seeds.
void draw() {
  seeds = int.parse(slider.value);
  context.clearRect(0, 0, MAX_D, MAX_D);
  for (var i = 0; i < seeds; i++) {
    final


(hexStringToByteArray(makeTestImageWithAPP1(app11))))
        .isEqualTo(1)
    assertThat(JfifUtil.getOrientation(hexStringToByteArray(makeTestImageWithAPP1(app13))))
        .isEqualTo(3)
    assertThat(JfifUtil.getOrientation(hexStringToByteArray(makeTestImageWithAPP1(app16a))))
        .isEqualTo(6)
    assertThat(JfifUtil.getOrientation(hexStringToByteArray(makeTestImageWithAPP1(app16b))))
        .isEqualTo(6)
    assertThat(JfifUtil.getOrientation(hexStringToByteArray(makeTestImageWithAPP1(app16c))))
        .isEqualTo(6)
    assertThat(JfifUtil.getOrientation(hexStringToByteArray(makeTestImageWithAPP1(app18))))
        .isEqualTo(8)

    testGetOrientationVariousApp1Location(app13, 3)
  }

  private fun testGetOrientationVariousApp1Location(app1: String, expectedOrientation: Int) {
    val imageWithStruct1: String = SOI + app1 + DQT + DHT + SOF + SOS + EOI
    val imageWithStruct2: String = SOI + DQT + app1 + DHT + SOF + SOS + EOI
    val imageWithStruct3: String = SOI + DQT + DHT + app1 + DRI + SOF + SOS + EOI
    val imageWithStruct4: String = SOI + DQT + DHT + DRI + app1 + SOF + SOS + EOI
    val imageWithStruct5: String = SOI + DQT + DHT + DRI + SOF + app1 + SOS + EOI
    val imageWithStruct6: String = SOI + DQT + DHT + SOF + app1 + SOS + EOI
    val imageWithStruct7: String = SOI + APP0 + APP2 + app1 + DQT + DHT + DRI + SOF + SOS + EOI
    val imageWithStruct8: String = SOI + APP0 + app1 + APP2 + DQT + DHT + DRI + SOF + SOS + EOI
    val imageWithStruct9: String = SOI + app1 + APP2 + DQT + DHT + DRI + SOF + SOS + EOI
    val imageWithStruct10: String = SOI + app1 + SOS + EOI

    assertThat(JfifUtil.getOrientation(hexStringToByteArray(imageWithStruct1)))
        .isEqualTo(expectedOrientation)
    assertThat(JfifUtil.getOrientation(hexStringToByteArray(imageWithStruct2)))
        .isEqualTo(expectedOrientation)
    assertThat(JfifUtil.getOrientation(hexStringToByteArray(imageWithStruct3)))
        .isEqualTo(expectedOrientation)
    assertThat(JfifUtil.getOrientation(hexStringToByteArray(imageWithStruct4)))
        .isEqualTo(expectedOrientation)
    assertThat(JfifUtil.getOrientation(hexStringToByteArray(imageWithStruct5)))
        .isEqualTo(expectedOrientation)
    assertThat(JfifUtil.getOrientation(hexStringToByteArray(imageWithStruct6)))
        .isEqualTo(expectedOrientation)
    assertThat(JfifUtil.getOrientation(hexStringToByteArray(imageWithStruct7)))
        .isEqualTo(expectedOrientation)
    assertThat(JfifUtil.getOrientation(hexStringToByteArray(imageWithStruct8)))
        .isEqualTo(expectedOrientation)
    assertThat(JfifUtil.getOrientation(hexStringToByteArray(imageWithStruct9)))
        .isEqualTo(expectedOrientation)
    assertThat(JfifUtil.getOrientation(hexStringToByteArray(imageWithStruct10)))
        .isEqualTo(expectedOrientation)
  }
}
/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

package com.facebook.imagepipeline.common

import com.facebook.imagepipeline.decoder.ImageDecoder
import org.assertj.core.api.Assertions.assertThat
import org.junit.Before
import o


Vector Machines, Regularization, Optimization, and Beyond. MIT Press.

Murphy, K. P. (2012). Machine Learning: A Probabilistic Perspective. MIT Press.

Vapnik, V. (1998). Statistical Learning Theory. Wiley-Interscience.

Lecture Notes

Andrew Ng’s Machine Learning course on Coursera, particularly the lectures on Support Vector Machines, covering linear SVMs, geometric interpretation, and constraints.

StatQuest with Josh Starmer

Data Science Bootcamp by The Erdos Institute

Journals and Articles

Cortes, C., & Vapnik, V. (1995). “Support-vector networks.” Machine Learning, 20(3), 273-297.

Aizerman, M. A., Braverman, E. M., & Rozonoer, L. I. (1964). “Theoretical foundations of the potential function method in pattern recognition learning.” Automation and Remote Control, 25, 821-837.

Share on

<a href="https://www.twitter.com/intent/tweet?url=https://mrislambd.github.io/dsandml/svm/" target="_blank" style="color:#1DA1F


// Copyright 2015 Google Inc. All Rights Reserved.
//
// Use of this source code is governed by a BSD-style license
// that can be found in the COPYING file in the root of the source
// tree. An additional intellectual property rights grant can be found
// in the file PATENTS. All contributing project authors may
// be found in the AUTHORS file in the root of the source tree.
// -----------------------------------------------------------------------------
//

#ifndef WEBP_WEBP_EXTRAS_H_
#define WEBP_WEBP_EXTRAS_H_

#include "./types.h"

#ifdef __cplusplus
extern "C" {
#endif

#include "./encode.h"

#define WEBP_EXTRAS_ABI_VERSION 0x0000    // MAJOR(8b) + MINOR(8b)

//------------------------------------------------------------------------------

// Returns the version number of the extras library, packed in hexadecimal using
// 8bits for each of major/minor/revision. E.g: v2.5.7 is 0x020507.
WEBP_EXTERN(int) WebPGetExtrasVersion(void);

//------------------------------------------------------------------------------
// Ad-hoc colorspace importers.

// Import luma sample (gray scale image) into 'picture'. The 'picture'
// width and height must be set prior to calling this function.
WEBP_EXTERN(int) WebPImportGray(const uint8_t* gray, WebPPicture* picture);

// Import rgb sample in RGB565 packed format into 'picture'. The 'picture'
// width and height must be set prior to calling this function.
WEBP_EXTERN(int) WebPImportRGB565(const uint8_t* rgb565, WebPPicture* pic);

// Import rgb sample in RGB4444 packed format into 'picture'. The 'picture'
// width and height must be set prior to calling this function.
WEBP_EXTERN(int) WebPImportRGB4444(const uint8_t* rgb4444, WebPPicture* pic);

//------------------------------------------------------------------------------

#ifdef __cplusplus
}    // extern "C"
#endif

#endif  /* WEBP_WEBP_EXTRAS_H_ */


        return bitmapRegion.height
    }

    override fun getIntrinsicWidth(): Int {
        return bitmapRegion.width
    }

    override fun draw(canvas: Canvas) {

    }

    override fun setAlpha(alpha: Int) {

    }

    override fun setColorFilter(colorFilter: ColorFilter?) {

    }

    override fun getOpacity(): Int {
        return PixelFormat.OPAQUE
    }
}package com.tencent.qcloud.tuikit.tuicallkit.state

import com.tencent.cloud.tuikit.engine.common.TUICommonDefine
import com.tencent.cloud.tuikit.engine.common.TUICommonDefine.AudioPlaybackDevice
import com.tencent.trtc.TRTCCloudDef
import com.trtc.tuikit.common.livedata.LiveData

class MediaState {
    var isMicrophoneMuted: LiveData<Boolean> = LiveData(false)

    // TODO:等 engine 适配完成后修改，当前直接使用 TRTC SDK 的定义
    var audioPlayoutDevice: LiveData<AudioPlaybackDevice> = LiveData(AudioPlaybackDevice.Speakerphone)

    var isCameraOpened: LiveData<Boolean> = LiveData(false)
    var isFrontCamera: LiveData<TUICommonDefine.Camera> = LiveData(TUICommonDefine.Camera.Front)

    var availableAudioDevices: LiveData<List<Int>> = LiveData(ArrayList())
    var selectedAudioDevice: LiveData<Int> = LiveData(TRTCCloudDef.TRTC_AUDIO_ROUTE_UNKNOWN)

    fun reset() {
        isMicrophoneMuted.set(false)
        audioPlayoutDevice.set(AudioPlaybackDevice.Speakerphone)

        isCameraOpened.set(false)
        isFrontCamera.set(TUICommonDefine.Camera.Front)

        availableAudioDevices.set(ArrayList())
        selectedAudioDevice.set(TRTCCloudDef.TRTC_AUDIO_ROUTE_UNKNOWN)
    }
}
package com.tencent.qcloud.tuikit.tuicallkit.manager

import com.tencent.qcloud.tuicore.TUIConfig
import com.tencent.qcloud.tuicore.TUIConstants
import com.tencent.qcloud.tuicore.TUICore

object PushManager {
    const val PUSH_UNREGISTER = -1
    const val PUSH_REGISTER_SUCCESS = 0
    const val PUSH_REGISTER_FAILED = 1

    fun getPushData(): PushData {
        if (TUICore.getService(TUIConstants.TIMPush.SERVICE_NAME) == null) {
            return PushData()
        }

        val pushData = PushData()
        pushData.channelId = TUIConfig.getCustomData("pushChannelId") as? Int ?: -1
        pushData.status = TUIConfig.getCustomData("pushStatus") as? Int ?: PUSH_UNREGISTER
        return pushData
    }
}

/**
 * @see TUIConstants.DeviceInfo
 */
class PushData {
    var channelId: Int = -1                       // current Push channelId
    var status: Int = PushManager.PUSH_UNREGISTER // current Push register status: -1-unregister, 0-success; 1-failed

    override fun toString(): String {
        var channel = ""
        when (channelId) {
            TUIConstants.DeviceInfo.BRAND_XIAOMI -> channel = "Xiaomi"
            TUIConstants.DeviceInfo.BRAND_HUAWEI -> channel = "Huawei"
            TUIConstants.DeviceInfo.BRAND_GOOGLE_ELSE -> channel = "Google"
            TUIConstants.DeviceInfo.BRAND_MEIZU -> channel = "Meizu"
            TUIConstants.DeviceInfo.BRAND_OPPO -> channel = "OPPO"
            TUIConstants.DeviceInfo.BRAND_VIVO -> channel = "VIVO"
            TUIConstants.DeviceInfo.BRAND_HONOR -> channel = "Honor"
        }
        var pushStatus = ""
        when (this.status) {
            PushManager.PUSH_UNREGISTER -> pushStatus = "unregister"
            PushManager.PUSH_REGISTER_SUCCESS -> pushStatus = "success"
            PushManag


ndent()
      )
    }
    When("The scenario is executed") {
      executeScenario("scenarioId".spEL,environmentName)
    }
    Then("the report status is SUCCESS") {
      checkScenarioReportSuccess()
    }
  }
}/*
 * SPDX-FileCopyrightText: 2017-2024 Enedis
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 */

package com.chutneytesting.kotlin

import com.github.tomakehurst.wiremock.WireMockServer
import com.github.tomakehurst.wiremock.client.WireMock
import org.junit.jupiter.api.AfterAll
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.TestInstance
import util.ChutneyServerInfoClearProperties
import util.SocketUtil

@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@ChutneyServerInfoClearProperties
abstract class HttpTestBase(
    wireMockServerPort: Int = SocketUtil.freePort()
) {
    val wireMockServer: WireMockServer
    val url: String

    init {
        wireMockServer = WireMockServer(SocketUtil.freePort(), wireMockServerPort)
        url = "https://localhost:${wireMockServerPort}"
    }

    @BeforeEach
    fun reset() {
        wireMockServer.resetAll()
        wireMockServer.start()
        WireMock.configureFor("localhost", wireMockServer.port())

    }

    @AfterAll
    fun tearDown() {
        wireMockServer.stop()
        wireMockServer.resetAll()
    }
}
/*
 * SPDX-FileCopyrightText: 2017-2024 Enedis
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 */

package com.chutneytesting.kotlin.util

import util.ChutneyServerInfoClearProperties
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.*
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.ValueSource
import java.net.MalformedURLException

class ChutneyServerInfoTest {

    @ParameterizedTest
    @ValueSource(strings = ["", "no.protocol.url"])
    fun malformed_url(chutneyServerUrl: String) {
        assertThrows<MalformedURLException> {
            ChutneyServerInfo(chutneyServerUrl, "user", "password")
        }
    }

    @Nested
    @DisplayName("Use system properties for proxy setup")
    @ChutneyServerInfoClearProperties
    inner class UseSystemPropsForProxy {

        @Test
        fun http_blank() {
            System.setProperty("http.proxyHost", "")

            var serverInfo: ChutneyServerInfo? = null

            assertDoesNotThrow {
                serverInfo = ChutneyServerInfo("http://host.name:1234", "", "")
            }

            assertThat(serverInfo?.proxyUrl).isNull()
            assertThat(serverInfo?.proxyUser).isNull()
            assertThat(serverInfo?.proxyPassword).isNull()
            assertThat(serverInfo?.proxyUri).isNull()
        }

        @Test
        fun http() {
            System.setProperty("http.proxyHost", "proxyHost")
            System.setProperty("http.proxyPort", "5678")
            System.setProperty("http.proxyUser", "proxyUer")
            System.setProperty("http.proxyPassword", "proxyPassword")

            val serverInfo = ChutneyServerInfo("http://host.name:1234", "user", "password")

            assertThat(serverInfo.proxyUrl).isEqualTo("http://proxyHost:5678")
            assertThat(serverInfo.proxyUser).isEqualTo(System.getProperty("http.proxyUser"))
            assertThat(serverInfo.proxyPassword).isEqualTo(System.getProperty("http.proxyPassword"))

            assertThat(serverInfo.proxyUri.toString()).isEqualTo(serverInfo.proxyUrl)
        }

        @Test
        fun http_default_port() {
            System.setProperty("http.proxyHost", "proxyHost")
            System.setProperty("http.


local function get_origin(href)
  local trimmed = tostring(href or ''):match('^%s*(.-)%s*$')
  if trimmed == nil or trimmed == '' then return '' end
  local origin = trimmed:match('^(%w[%w%+%-%.]*:%/*[^/%?#]+)')
  return origin or ''
end

local function main()
  local input = gurt.select('#value')
  local submit = gurt.select('#submit')

  if input == nil or submit == nil then


ovider(groupName));
  final group = ref.watch(
    groupsProvider.select(
      (state) => state.getGroup(groupName),
    ),
  );
  return group?.getCurrentSelectedName(proxyName ?? '');
}

@riverpod
String getProxyDesc(Ref ref, Proxy proxy) {
  final groupTypeNamesList = GroupType.values.map((e) => e.name).toList();
  if (!groupTypeNamesList.contains(proxy.type)) {
    return proxy.type;
  } else {
    final groups = ref.watch(groupsProvider);
    final index = groups.indexWhere((element) => element.name == proxy.name);
    if (index == -1) return proxy.type;
    final state = ref.watch(getProxyCardStateProvider(proxy.name));
    return "${proxy.type}(${state.proxyName.isNotEmpty ? state.proxyName : '*'})";
  }
}

@riverpod
class ProfileOverrideState extends _$ProfileOverrideState {
  @override
  ProfileOverrideStateModel build() {
    return ProfileOverrideStateModel(
      isEdit: false,
      selectedRules: {},
    );
  }

  updateState(
    ProfileOverrideStateModel? Function(ProfileOverrideStateModel state)
        builder,
  ) {
    final value = builder(state);
    if (value == null) {
      return;
    }
    state = value;
  }
}

@riverpod
OverrideData? getProfileOverrideData(Ref ref, String profileId) {
  return ref.watch(
    profilesProvider.select(
      (state) => state.getProfile(profileId)?.overrideData,
    ),
  );
}
import 'dart:math';

import 'package:errorx/common/common.dart';
import 'package:errorx/models/common.dart';
import 'package:errorx/providers/providers.dart';
import 'package:errorx/state.dart';
import 'package:errorx/widgets/widgets.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

import 'card.dart';
import 'common.dart';

List<Proxy> currentTabProxies = [];
String? currentTabTestUrl;

typedef GroupNameKeyMap = Map<String, GlobalObjectKey<ProxyGroupViewState>>;

class ProxiesTabFragment extends ConsumerStatefulWidget {
  const ProxiesTabFragment({super.key});

  @override
  ConsumerState<ProxiesTabFragment> createState() => ProxiesTabFragmentState();
}

class ProxiesTabFragmentState extends ConsumerState<ProxiesTabFragment>
    with TickerProviderStateMixin {
  TabController? _tabController;
  final _hasMoreButtonNotifier = ValueNotifier<bool>(false);
  GroupNameKeyMap _keyMap = {};

  @override
  void initState() {
    super.initState();
    _handleTabListen();
  }

  @override
  void dispose() {
    _destroyTabController();
    super.dispose();
  }

  scrollToGroupSelected() {
    final currentGroupName = globalState.appController.getCurrentGroupName();
    _keyMap[currentGroupName]?.currentState?.scrollToSelected();
  }

  _buildMoreButton() {
    return Consumer(
      builder: (_, ref, ___) {
        final isMobileView = ref.watch(isMobileViewProvider);
        return Container(
          width: 40,
          height: 40,
          decoration: BoxDecoration(
            gradient: LinearGradient(
              begin: Alignment.topLeft,
              end: Alignment.bottomRight,
              colors: [
                context.colorScheme.primaryContainer.withOpacity(0.8),
                context.colorScheme.secondaryContainer.withOpacity(0.6),
              ],
            ),
            borderRadius: BorderRadius.circular(12),
            border: Border.all(
              color: context.colorScheme.primary.withOpacity(0


 "children IDs");
				assertEqualTrees("Recursive call", expected, actual, expectedChildren[i], newDepth);
			}
		}
	}

	/**
	 * Asserts that the given tree contains all of the given paths
	 */
	static protected void assertHasPaths(ElementTree tree, IPath[] paths) {
		for (int i = 0; i < paths.length; i++) {
			assertTrue(tree.includes(paths[i]), "assertHasPaths" + i);
		}
	}

	/**
	 * Asserts that the given tree doesn not contain all of the given paths
	 */
	static protected void assertNoPaths(ElementTree tree, IPath[] paths) {
		for (IPath path : paths) {
			assertFalse(tree.includes(path), "assertNoPaths: " + path);
		}
	}

	/**
	 * Asserts that the Test ElementTree has its original structure
	 */
	static protected void assertTreeStructure(ElementTree tree) {
		assertHasPaths(tree, getTreePaths());

		IPath[] children = tree.getChildren(IPath.ROOT);
		assertThat(children).hasSize(1);

		/* solution children */
		children = tree.getChildren(children[0]);
		assertThat(children).hasSize(2);
		assertThat(tree.getChildren(project1)).isEmpty();

		/* project2 children */
		children = tree.getChildren(children[1]);
		assertThat(children).hasSize(3);
		assertThat(tree.getChildren(file1)).isEmpty();
		assertThat(tree.getChildren(folder2)).isEmpty();

		/* folder1 children */
		children = tree.getChildren(children[1]);
		assertThat(children).hasSize(3);
		assertThat(tree.getChildren(file2)).isEmpty();
		assertThat(tree.getChildren(folder4)).isEmpty();

		/* folder3 children */
		children = tree.getChildren(children[1]);
		assertThat(children).hasSize(1);
		assertThat(tree.getChildren(file3)).isEmpty();
	}

	static ElementTree createTestElementTree() {
		/**
		 * This is a sample element tree on which tests are performed.
		 * The Paths in this tree are found in IPathConstants.  The tree's
		 * basic structure is as follows:
		 *	solution
		 *		project1
		 *		project2
		 *			file1
		 *			folder1
		 *				file2
		 *				folder3
		 *					file3
		 *				folder4
		 *			folder2
		 */

		ElementTree tree = new ElementTree();
		tree.createElement(solution, "solution");
		tree.createElement(project1, "project1");
		tree.createElement(project2, "project2");
		tree.createElement(file1, "file1");
		tree.createElement(folder1, "folder1");
		tree.createElement(folder2, "folder2");
		tree.createElement(file2, "file2");
		tree.createElement(folder3, "folder3");
		tree.createElement(folder4, "folder4");
		tree.createElement(file3, "file3");

		return tree;
	}

	/**
	 * Does several routine operations on the subtree rooted at
	 * the given path.  Opens a new delta after every operation.
	 * Returns an array of all the intermediary ElementTrees.
	 */
	static protected ElementTree[] doManyRoutineOperations(ElementTree tree, IPath path) {
		ArrayList<ElementTree> trees = new ArrayList<>();
		trees.add(tree);

		int repeat = 1;

		/* create file elements */
		tree = tree.newEmptyDelta();
		IPath[] files = getFilePaths(path);
		for (IPath file : files) {
			Object data = file.toString();
			tree.createElement(file, data);

			tree.immutable();
			trees.add(tree);
			tree = tree.newEmptyDelta();
		}

		/* modify the data of all file elements a few times */
		for (int i = 0; i < repeat; i++) {
			Object


(o[1],"len")]||1,u=t["n".concat(o[0])]||1,c=t["n".concat(o[1])]||1,l=(u+1)*(c+1),h=new Float32Array(3*l),f=new Float32Array(3*l),p=new Float32Array(2*l);r&&(a=-a);let d=0,A=0;for(let t=0;t<=c;t++)for(let i=0;i<=u;i++){const o=i/u,l=t/c;switch(p[d+0]=r?1-o:o,p[d+1]=l,e){case"x,y":h[A+0]=a*o-.5*a,h[A+1]=s*l-.5*s,h[A+2]=n,f[A+0]=0,f[A+1]=0,f[A+2]=r?1:-1;break;case"x,z":h[A+0]=a*o-.5*a,h[A+1]=n,h[A+2]=s*l-.5*s,f[A+0]=0,f[A+1]=r?1:-1,f[A+2]=0;break;case"y,z":h[A+0]=n,h[A+1]=a*o-.5*a,h[A+2]=s*l-.5*s,f[A+0]=r?1:-1,f[A+1]=0,f[A+2]=0;break;default:throw new Error("PlaneGeometry: unknown type")}d+=2,A+=3}const g=u+1,m=new Uint16Array(u*c*6);for(let t=0;t<c;t++)for(let e=0;e<u;e++){const n=6*(t*u+e);m[n+0]=(t+0)*g+e,m[n+1]=(t+1)*g+e,m[n+2]=(t+0)*g+e+1,m[n+3]=(t+1)*g+e,m[n+4]=(t+1)*g+e+1,m[n+5]=(t+0)*g+e+1}const y={indices:{size:1,value:m},attributes:{POSITION:{size:3,value:h},NORMAL:{size:3,value:f},TEXCOORD_0:{size:2,value:p}}};return i?function(t){const{indices:e,attributes:n}=t;if(!e)return t;const r=e.value.length,i={};for(const t in n){const o=n[t],{constant:a,value:s,size:u}=o;if(a||!u)continue;const c=new s.constructor(r*u);for(let t=0;t<r;++t){const n=e.value[t];for(let e=0;e<u;e++)c[t*u+e]=s[n*u+e]}i[t]={size:u,value:c}}return{attributes:Object.assign({},n,i)}}(y):y}(t);super({...t,id:e,indices:n,attributes:{...r,...t.attributes}})}}class B extends _.a{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:e=Object(b.c)("sphere-geometry")}=t,{indices:n,attributes:r}=function(t){const{nlat:e=10,nlong:n=10}=t;let{radius:r=1}=t;const i=Math.PI-0,o=2*Math.PI-0,a=(e+1)*(n+1);if("number"==typeof r){const t=r;r=(e,n,r,i,o)=>t}const s=new Float32Array(3*a),u=new Float32Array(3*a),c=new Float32Array(2*a),l=new(a>65535?Uint32Array:Uint16Array)(e*n*6);for(let t=0;t<=e;t++)for(let a=0;a<=n;a++){const l=a/n,h=t/e,f=a+t*(n+1),p=2*f,d=3*f,A=o*l,g=i*h,m=Math.sin(A),y=Math.cos(A),v=Math.sin(g),_=Ma


l.AuditConn{
				IdModel:   model.IdModel{Id: ex.Id},
				FromPeer:  ac.FromPeer,
				FromName:  ac.FromName,
				SessionId: ac.SessionId,
				Type:      ac.Type,
			}
			service.AllService.AuditService.UpdateAuditConn(up)
		}
	}
	response.Success(c, "")
}

// AuditFile
// @Tags 审计
// @Summary 审计文件
// @Description 审计文件
// @Accept  json
// @Produce  json
// @Param body body request.AuditFileForm true "审计文件"
// @Success 200 {string} string ""
// @Failure 500 {object} response.Response
// @Router /audit/file [post]
func (a *Audit) AuditFile(c *gin.Context) {
	aff := &request.AuditFileForm{}
	err := c.ShouldBindBodyWith(aff, binding.JSON)
	if err != nil {
		response.Error(c, response.TranslateMsg(c, "ParamsError")+err.Error())
		return
	}
	//ttt := &gin.H{}
	//c.ShouldBindBodyWith(ttt, binding.JSON)
	//fmt.Println(ttt)
	af := aff.ToAuditFile()
	service.AllService.AuditService.CreateAuditFile(af)
	response.Success(c, "")
}
package api

import (
	"github.com/gin-gonic/gin"
	requstform "github.com/lejianwen/rustdesk-api/v2/http/request/api"
	"github.com/lejianwen/rustdesk-api/v2/http/response"
	"github.com/lejianwen/rustdesk-api/v2/model"
	"github.com/lejianwen/rustdesk-api/v2/service"
	"net/http"
	"time"
)

type Index struct {
}

// Index 首页
// @Tags 首页
// @Summary 首页
// @Description 首页
// @Accept  json
// @Produce  json
// @Success 200 {object} response.Response
// @Failure 500 {object} response.Response
// @Router / [get]
func (i *Index) Index(c *gin.Context) {
	response.Success(
		c,
		"Hello Gwen",
	)
}

// Heartbeat 心跳
// @Tags 首页
// @Summary 心跳
// @Description 心跳
// @Accept  json
// @Produce  json
// @Success 200 {object} nil
// @Failure 500 {object} response.Response
// @Router /heartbeat [post]
func (i *Index) Heartbeat(c *gin.Context) {
	info := &requstform.PeerInfoInHeartbeat{}
	err := c.ShouldBindJSON(info)
	if err != nil {
		c.JSON(http.StatusOK, gin.H{})
		return
	}
	if info.Uuid == "" {
		c.JSON(http.StatusOK, gin.H{})
		return
	}
	peer := service.AllService.PeerService.FindById(info.Id)
	if peer == nil || peer.RowId == 0 {
		c.JSON(http.StatusOK, gin.H{})
		return
	}
	//如果在40s以内则不更新
	if time.Now().Unix()-peer.LastOnlineTime >= 30 {
		upp := &model.Peer{RowId: peer.RowId, LastOnlineTime: time.Now().Unix(), LastOnlineIp: c.ClientIP()}
		service.AllService.PeerService.Update(upp)
	}
	c.JSON(http.StatusOK, gin.H{})
}

// Version 版本
// @Tags 首页
// @Summary 版本
// @Description 版本
// @Accept  json
// @Produce  json


let board = Board::new(5, 5, 10, 5, true, None);
    let info = Info::new(15, InfoLayout::Top, &Vec::new());
    let game = Rc::new(RefCell::new(Game::new(stdin, stdout, Rc::clone(&app))));
    game.borrow_mut().init(board, Some(info));
    game.borrow_mut().start();
}
//! Full port configuration

use portpicker::pick_unused_port;

use protobuf::RepeatedField;
use sc2_proto::sc2api::{PortSet, RequestJoinGame};

/// Full set of ports needed by SC2
#[derive(Debug, Clone)]
pub struct PortConfig {
    shared: u16,
    server_game: u16,
    server_base: u16,
    client_game: u16,
    client_base: u16,
}
impl PortConfig {
    /// Create a set of random ports
    pub fn new() -> Option<Self> {
        Some(Self {
            shared: pick_unused_port()?,
            server_game: pick_unused_port()?,
            server_base: pick_unused_port()?,
            client_game: pick_unused_port()?,
            client_base: pick_unused_port()?,
        })
    }

    /// Apply port config to a game join request
    pub fn apply_proto(&self, req: &mut RequestJoinGame, singleplayer: bool) {
        req.set_shared_port(self.shared as i32);

        if !singleplayer {
            let mut server_ps = PortSet::new();
            server_ps.set_game_port(self.server_game as i32);
            server_ps.set_base_port(self.server_base as i32);
            req.set_server_ports(server_ps);

            let mut client_ps = PortSet::new();
            client_ps.set_game_port(self.client_game as i32);
            client_ps.set_base_port(self.client_base as i32);
            req.set_client_ports(RepeatedField::from_vec(vec![client_ps]));
        }
    }
}
<reponame>zshift/warframestat-rs
/*
 * WarframeStat.us API
 *
 * Simple API for data from the game Warframe. [Parser Docs](https://wfcd.github.io/warframe-worldstate-parser/) [Items Types](https://github.com/WFCD/warframe-items/blob/master/index.d.ts)
 *
 * The version of the OpenAPI document: living
 * Contact: <EMAIL>
 * Generated by: https://openapi-generator.tech
 */

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Mission {
    #[serde(rename = "reward")]
    pub reward: Box<crate::models::Reward>,
    #[serde(rename = "node")]
    pub node: String,
    #[serde(rename = "faction")]
    pub faction: String,
    #[serde(rename = "maxEnemyLevel")]
    pub max_enemy_level: f32,
    #[serde(rename = "minEnemyLevel")]
    pub min_enemy_level: f32,
    #[serde(rename = "maxWaveNum")]
    pub max_wave_num: f32,
    #[serde(rename = "type")]
    pub _type: String,
    #[serde(rename = "nightmare")]
    pub nightmare: bool,
    /// Whether or not an Archwing is required for participating in the mision.
    #[serde(rename = "archwingRequired")]
    pub archwing_required: bool,
    /// Whether or not the mission takes place in a submerssible mission.
    #[serde(rename = "isSharkwing", skip_serializing_if = "Option::is_none")]
    pub is_sharkwing: Option<bool>,
    /// Enemy specification for the mission
    #[serde(rename = "enemySpec", skip_serializ


0x6c,0,BUILDING_MASK_NONE,["face cutout standee - 6c? japanese rite"]],
[0x6d,0x6d,0,BUILDING_MASK_NONE,["face cutout standee - 6d? sky night"]],
[0x6e,0x6e,0,BUILDING_MASK_NONE,["face cutout standee - Groundhog Day"]],
[0x6f,0x6f,0,BUILDING_MASK_NONE,["face cutout standee - Bean Throwing Festival (Setsubun)"]],
[0x70,0x70,0,BUILDING_MASK_NONE,["face cutout standee - 70? japanese wedding"]],
[0x71,0x71,0,BUILDING_MASK_NONE,["face cutout standee - Shamrock Day"]],
[0x72,0x72,0,BUILDING_MASK_NONE,["face cutout standee - 72? garden kids"]],
[0x73,0x73,0,BUILDING_MASK_NONE,["face cutout standee - Nature Day"]],
[0x74,0x74,0,BUILDING_MASK_NONE,["face cutout standee - 74? carp banner"]],
[0x75,0x75,0,BUILDING_MASK_NONE,["face cutout standee - 75? japanese school"]],
[0x76,0x76,0,BUILDING_MASK_NONE,["face cutout standee - Summer Solstice"]],
[0x77,0x77,0,BUILDING_MASK_NONE,["face cutout standee - Starcrossed Day (Tanabata)"]],
[0x78,0x78,0,BUILDING_MASK_NONE,["face cutout standee - Obon"]],
[0x79,0x79,0,BUILDING_MASK_NONE,["face cutout standee - Labor Day"]],
[0x7a,0x7a,0,BUILDING_MASK_NONE,["face cutout standee - Tsukimi"]],
[0x7b,0x7b,0,BUILDING_MASK_NONE,["face cutout standee - Autumn Moon"]],
[0x7c,0x7c,0,BUILDING_MASK_NONE,["face cutout standee - Explorer's Day"]],
[0x7d,0x7d,0,BUILDING_MASK_NONE,["face cutout standee - Toy Day"]],
[0x7e,0x7e,0,BUILDING_MASK_NONE,["face cutout standee - Winter Solstice"]],
/* from 0x7f to 0x8b - glitchy doors */
[0x8c,0x8e,0,BUILDING_MASK_NONE,["Main Street lamp","Lampe centre-ville"]],
[0x8d,0x8f,0,BUILDING_MASK_1x2,["Main Street bench (vertical)"]],
[0x8e,0x90,6,BUILDING_MASK_BRIDGE_N_S,["cobblestone bridge (N-S)","pont en pierre (N-S)","Steinbrücke (N-S)","ponte di pietra (N-S)","puente de piedra (N-S)"]],
[0x8f,0x91,6,BUILDING_MASK_BRIDGE_SW_NE,["cobblestone bridge (SW-NE)","pont en pierre (SO-NE)","Steinbrücke (SW-NE)","ponte di pietra (SW-NE)","puente de piedra (SO-NE)"]],
[0x90,0x92,6,BUILDING_MASK_BRIDGE_NW_SE,["cobblestone bridge (NW-SE)","pont en pierre (NO-SE)","Steinbrücke (NW-SE)","ponte di pietra (NW-SE)","puente de piedra (NO-S


);
                    other_vec.truncate(truncate_len);
                    let posterior_fs_length = fs_vec.len();
                    let posterior_other_length = other_vec.len();
                    if truncate_len <= prior_fs_length {
                        prop_assert_eq!(
                            posterior_fs_length,
                            truncate_len,
                            "fsv did not truncate to the target len"
                        );
                        prop_assert_eq!(
                            posterior_other_length,
                            truncate_len,
                            "other did not truncate to the target len"
                        );
                    }
                }
                VecLikeOp::Remove(index) => {
                    let fs_result = VecLike::try_remove(&mut fs_vec, index);
                    let other_result = VecLike::try_remove(other_vec, index);
                    prop_assert_eq!(
                        other_result,
                        fs_result,
                        "Returned values from `try_remove` should be the same"
                    );
                }
                VecLikeOp::SwapRemove(index) => {
                    let fs_result = VecLike::try_swap_remove(&mut fs_vec, index);
                    let other_result = VecLike::try_swap_remove(other_vec, index);
                    prop_assert_eq!(
                        other_result,
                        fs_result,
                        "Returned values from `try_swap_remove` should be the same"
                    );
                }
            }
            prop_assert_equivalent(other_vec, &mut fs_vec)?;
        }
        Ok(())
    }

    proptest! {
        #[test]
        #[cfg_attr(miri, ignore)]
        fn compare_vec_like_operations_against_std(
            operations in proptest::collection::vec(arbitrary_vec_like_op(512), 1..1000),
            storage_bytes in proptest::collection::vec(Just(MaybeUninit::new(0u8)), 0..1024)
        ) {
            let mut std_vec = Vec::new();
            assert_alike_operations(&mut std_vec, operations, storage_bytes)?;
        }
        #[test]
        #[cfg_attr(miri, ignore)]
        fn compare_vec_like_operations_against_array_vec(
            operations in proptest::collection::vec(arbitrary_vec_like_op(512), 1..1000),
            storage_bytes in proptest::collection::vec(Just(MaybeUninit::new(0u8)), 0..1024)
        ) {
            let mut av_vec: ArrayVec<[u16; 32]> = ArrayVec::new();
            assert_alike_operations(&mut av_vec, operations, storage_bytes)?;
        }
    }
}
<reponame>neithernut/issue-states<gh_stars>1-10
// Issue states
//
// Copyright (c) 2018 <NAME>
//
// MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//

//! P


  visibility: visible;
}

.CodeMirror-selected { background: #d9d9d9; }
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
.CodeMirror-crosshair { cursor: crosshair; }
.CodeMirror ::selection { background: #d7d4f0; }
.CodeMirror ::-moz-selection { background: #d7d4f0; }

.cm-searching {
  background: #ffa;
  background: rgba(255, 255, 0, .4);
}

/* IE7 hack to prevent it from returning funny offsetTops on the spans */
.CodeMirror span { *vertical-align: text-bottom; }

/* Used to force a border model for a node */
.cm-force-border { padding-right: .1px; }

@media print {
  /* Hide the cursor when printing */
  .CodeMirror div.CodeMirror-cursors {
    visibility: hidden;
  }
}

/* See issue #2901 */
.cm-tab-wrap-hack:after { content: ''; }

/* Help users use markselection to safely style text background */
span.CodeMirror-selectedtext { background: none; }
/*!
 * Bootstrap v3.3.0 (http://getbootstrap.com)
 * Copyright 2011-2014 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */.btn-default,.btn-primary,.btn-success,.btn-info,.btn-warning,.btn-danger{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-default:active,.btn-primary:active,.btn-success:active,.btn-info:active,.btn-warning:active,.btn-danger:active,.btn-default.active,.btn-primary.active,.btn-success.active,.btn-info.active,.btn-warning.active,.btn-danger.active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-default .badge,.btn-primary .badge,.btn-success .badge,.btn-info .badge,.btn-warning .badge,.btn-danger .badge{text-shadow:none}.btn:active,.btn.active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:hover,.btn-default:focus{background-color:#e0e0e0;background-position:0 -15px}.btn-default:active,.btn-default.active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default:disabled,.btn-default[disabled]{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#428bca 0,#2d6ca2 100%);background-image:-o-linear-gradient(top,#428bca 0,#2d6ca2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#428bca),to(#2d6ca2));background-image:linear-gradient(to botto


khfk", -46.140792422, 157.008880022},
	{0x3c29df1cb1abb3cd, "7hnxy75jpftw", -21.120342941, -35.580256778},
	{0x3722744d77c61141, "6wj78mcrss8n", -10.601867257, -60.104291367},
	{0x42c93f6d8b991c71, "8c4myvdcm4f7", 6.666184489, -142.785312424},
	{0xc060d50d42733752, "s1heb3b2fdvp", 6.293937407, 6.339568753},
	{0x14d1bb591b73c966, "2m8vqq8vfg4q", -13.102938624, -167.419503199},
	{0x5d6c18b68b0c1706, "cpq1jenc1hch", 85.973708652, -126.311486704},
	{0xb2c0715bbfcdf111, "qc072qxztrsj", -38.766676795, 124.123422582},
	{0x5281f207a4768e4c, "bb0z41x4fu74", 46.23920381, -145.097686568},
	{0x4c291c1bf2c4d4c8, "9hnjs6zksmbd", 23.482706763, -126.365592788},
	{0xf0f06cb77b071052, "y3s6tevv0w85", 53.898446209, 107.476179692},
	{0x1d812f0d55d2a41f, "3q0ky3bpubk1", -10.404094004, -123.123569777},
	{0x3876313ec8038964, "71v32gq80f4q", -34.918658833, -37.575266857},
	{0x52e82dc2b6ce8e95, "bcn2vhpqtu79", 50.779947487, -137.231003089},
	{0x64a960af9a738cb3, "dknq1cwuff6c", 23.563754919, -69.87464167},
	{0x66a6675152caa862, "dum6fnbktbn6", 24.427500129, -48.778698323},
	{0x1167042db23b7781, "25mh8cek7evs", -25.918744232, -172.931170164},
	{0xd4c4234743cc2113, "um226ju3thhj", 74.607060843, 11.695509674},
	{0xb22cf1506c3595e3, "q8qg2n3d6qby", -42.987705127, 121.994345101},
	{0xcc4459e31667c2b6, "tj25mssqdz1c", 30.128411926, 45.247656233},
	{0xad3b215ed859b899, "pnxk2rqsc6w9", -52.649775225, 145.215287761},
	{0x833c63747e8abcb7, "hdy66x3yjbyc", -74.09488245, 31.401585002},
	{0x5ddc32292e54a8ab, "crf34b9fbknb", 88.772771401, -120.46266456},
	{0xb89aa0a17f4e6ce2, "r2eb18cz9tqf", -42.182064165, 151.591832319},
	{0x6d44a4efac659b4d, "ep2b9vxddqen", 40.899818203, -43.858007722},


predefine__color-selector.is-alpha{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.el-color-hue-slider{position:relative;box-sizing:border-box;width:280px;height:12px;background-color:red;padding:0 2px}.el-color-hue-slider__bar{position:relative;background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);height:100%}.el-color-hue-slider__thumb{position:absolute;cursor:pointer;box-sizing:border-box;left:0;top:0;width:4px;height:100%;border-radius:1px;background:#fff;border:1px solid #f0f0f0;box-shadow:0 0 2px rgba(0,0,0,.6);z-index:1}.el-color-hue-slider.is-vertical{width:12px;height:180px;padding:2px 0}.el-color-hue-slider.is-vertical .el-color-hue-slider__bar{background:linear-gradient(180deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.el-color-hue-slider.is-vertical .el-color-hue-slider__thumb{left:0;top:0;width:100%;height:4px}.el-color-svpanel{position:relative;width:280px;height:180px}.el-color-svpanel__black,.el-color-svpanel__white{position:absolute;top:0;left:0;right:0;bottom:0}.el-color-svpanel__white{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.el-color-svpanel__black{background:linear-gradient(0deg,#000,transparent)}.el-color-svpanel__cursor{position:absolute}.el-color-svpanel__cursor>div{cursor:head;width:4px;height:4px;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px rgba(0,0,0,.3),0 0 1px 2px rgba(0,0,0,.4);border-radius:50%;transform:translate(-2px,-2px)}.el-color-alpha-slider{position:relative;box-sizing:border-box;width:280px;height:12px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.el-color-alpha-slider__bar{position:relative;background:linear-gradient(90deg,hsla(0,0%,100%,0) 0,#fff);height:100%}.el-color-alpha-slider__thumb{position:absolute;cursor:pointer;box-sizing:border-box;left:0;top:0;width:4px;height:100%;border-radius:1px;background:#fff;border:1px solid #f0f0f0;box-shadow:0 0 2px rgba(0,0,0,.6);z-index:1}.el-color-alpha-slider.is-vertical{width:20px;height:180px}.el-color-alpha-slider.is-vertical .el-color-alpha-slider__bar{background:linear-gradient(180deg,hsla(0,0%,100%,0) 0,#fff)}.el-color-alpha-slider.is-vertical .el-color-alpha-slider__thumb{left:0;top:0;width:100%;height:4px}.el-color-dropdown{width:300px}.el-color-dropdown__main-wrapper


# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.

from __future__ import absolute_import, division, print_function

INCLUDES = """
#include <openssl/ecdsa.h>
"""

TYPES = """
static const int Cryptography_HAS_ECDSA;

typedef ... ECDSA_SIG;

typedef ... CRYPTO_EX_new;
typedef ... CRYPTO_EX_dup;
typedef ... CRYPTO_EX_free;
"""

FUNCTIONS = """
ECDSA_SIG *ECDSA_SIG_new();
void ECDSA_SIG_free(ECDSA_SIG *);
int i2d_ECDSA_SIG(const ECDSA_SIG *, unsigned char **);
ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **s, const unsigned char **, long);
ECDSA_SIG *ECDSA_do_sign(const unsigned char *, int, EC_KEY *);
int ECDSA_do_verify(const unsigned char *, int, const ECDSA_SIG *, EC_KEY *);
int ECDSA_sign(int, const unsigned char *, int, unsigned char *,
               unsigned int *, EC_KEY *);
int ECDSA_verify(int, const unsigned char *, int, const unsigned char *, int,
                 EC_KEY *);
int ECDSA_size(const EC_KEY *);

"""

CUSTOMIZATIONS = """
static const long Cryptography_HAS_ECDSA = 1;
"""


, Load.Index);
        return Visit(target, handle, index);
    }

    /// <inheritdoc/>
    public string Visit(IIRPrinterContext context, Load target, bool iLmode)
    {
        var lhs = context.GetArgument(target, Load.Handle);
        var rhs = context.GetArgument(target, Load.Index);
        return $"{lhs}[{rhs}]";
    }

    private IRType Visit(Load target, TensorType handle, TensorType index)
    {
        if (handle is not TensorType { DType: PointerType { } p })
        {
            return new InvalidType("handle must be pointer type!");
        }

        return TensorType.Scalar(p.ElemType);
    }
}


            },
            {
              predicate: val => typeof val === 'string',
              replacer: (val: string) => ({ argument: val })
            }
          ]).first(a);
        }
      )
      .filter(Boolean);

    return argArray || [];
  }
}

class Predicate {
  private predicates: Array<ICommandEvalValueInput<any, any>>;
  constructor(
    predicates?:
      | Array<ICommandEvalValueInput<any, any>>
      | ICommandEvalValueInput<any, any>
  ) {
    if (!predicates) return;

    if (!Array.isArray(predicates)) {
      predicates = [predicates];
    }

    this.predicates = predicates;
  }

  public first(value: any): any | undefined {
    if (!value) return;

    const obj = this.predicates.find(x => x.predicate(value));

    if (!obj) return;

    return obj.replacer(value);
  }

  public all(value: any): any | undefined {
    if (!value) return;

    let newValue: any = value;

    this.predicates.forEach(({ predicate, replacer }) => {
      if (predicate && replacer && predicate(value)) {
        newValue = replacer(newValue);
      }
    });

    return newValue;
  }
}

export { BuilderUtils, CommandUtils, FileUtils, LogUtils, Predicate };
import * as mongoose from 'mongoose';

export interface Group extends mongoose.Document {
	name: string;
	users: string[];
	owner: string;
	usersCount: number;
}

const GroupSchema: mongoose.Schema = new mongoose.Schema({
	name: String,
	users: [{ type: String, ref: 'User' }],
	owner: { type: String, ref: 'User' },
	usersCount: Number
});

export default mongoose.model<Group>('Group', GroupSchema);
import { GuildMember } from 'discord.js'
import path from 'path'
import fs from 'fs'
import { readdirAsync } from './utils'

export type Welcome = (member: GuildMember) => any

export async function loadWelcomes () {
  const welcomers = new Map()
  const welcomerDirectory = path.resolve(__dirname, 'welcome')
  if (!fs.existsSync(welcomerDirectory)) {
    return
  }

  const files = await readdirAsync(welcomerDirectory)
  files.forEach(async file => {
    const p = path.parse(file)
    if (p.ext === '.js') {
      const welcome = await loadWelcome(p.name)
      welcomers.set(path, welcome)
    }
  })

  return welcomers
}

export async function loadWelcome (path: string): Promise<Welcome> {
  const module = await import('./welcome/' + path + '.js')
  return module.default as Welcome
}
import { AmiiboModel } from "./AmiibosModel";
import { amiiboList } from './lineup.model.json';
import { injectable } from "inversify";
import { Observable, from } from "rxjs";
import { map, tap } from "rxjs/operators";

@injectable()
export class AmiibosService {

  /**
   * Gets the list of Amiibos Series available.
   *
   * @returns The series available.
   */
  public getAmiiboSeries(): Observable<Array<string>> {
    return this.loadAmiibos().pipe(
      map(amiibos => amiibos
        .map(amiibo => amiibo.series)
        .filter((series: string | null): series is string => !!series)
        .filter((value, index, self) => self.indexOf(value) === index)
        .sort()
      ),
      tap(console.log)
    );
  }

  /**
   * Gets all of the available amiibos.


uage;
    }

    public getLanguages(): string[] {
        return this._languages;
    }
}
import express from 'express';
//import {Order} from '../client/src/api';
import bodyParser = require('body-parser');
const fs = require('fs');
//products holds all information fields on all available products (items).
const {products} = require('./products.json'); // called once as server launches

const app = express();
// allOrders holds all information fields (found in orders.Json file), regarding each and every order (not filtered).
const allOrders: any[] = require('./orders.json'); // called once as server launches
const PORT = 3232;
const PAGE_SIZE = 20;

app.use(bodyParser.json());

app.use((_, res, next) => {
	res.setHeader('Access-Control-Allow-Origin', '*');
	res.setHeader('Access-Control-Allow-Methods', '*');
	res.setHeader('Access-Control-Allow-Headers', '*');
	next();
});

/**
 * returns true if filter isn't active or is a substring of customer's name / order ID.
 */
function nameFilter(name:string,order:any):boolean{
	return (name === '' || ( name!=='' && ( (order["customer"]["name"] +' '+ order["id"] )
	.toLowerCase().indexOf(name.toLowerCase()) !== -1 ) ))
}

/**
 * returns true if filter isn't active or is a match for order's fulfillment status.
 */
function fulfillmentFilter(fulfillment:string,order:any):boolean{
	return (fulfillment === '' || (fulfillment!=='' &&  (order["fulfillmentStatus"].toLowerCase()===(fulfillment.toLowerCase()) )))
}

/**
 * returns true if filter isn't active or is a match for order's payment status.
 */
function paymentFilter(payment:string,order:any):boolean{
	return (payment === '' || (payment!=='' && ( order["billingInfo"]["status"].toLowerCase()===(payment.toLowerCase())) ))
}

/**
 * returns true if filter isn't active or is a match one of the order's items.
 */
function productFilter(product:string,order:any):boolean{
	var orderItemNames:string = '';

	//orderItemNames holds the products' names for the current order
	order["items"].forEach((item: { [key: string]: string | number}) => {//declaring item as an object with keys of type string and values of string/number. item:{id:string} would have sufficed.
		orderItemNames = orderItemNames + ' ' + products[item["id"]]["name"]
	});
	return (product === '' || (product!=='' && ( orderItemNames.toLowerCase().indexOf(product.toLowerCase()) !== -1) ))
}

/**
 * returns slice of orders that fits given page and conforms to given filter.
 */
app.get('/api/orders', (req, res) => {
	const page = <number>(req.query.page || 1);
	const customerName = <string>(req.query.customerName ||'');
	const fulfillmentStatus = <string>(req.query.fulfillmentStatus ||'');
	const productName = <string>(req.query.productName ||'');
	const paymentStatus = <string>(req.query.paymentStatus ||'');

	const orders = <any>[];
	// if an order passes all filters it will appear on the client side, if it matches the page user's on.
	allOrders.forEach(order => {
		if (nameFilter(customerName,order) && fulfillmentFilter(fulfillmentStatus,order)
			&& paymentFilter(paymentStatus,order) && productFilter(productName,order)){
			orders.push(order)
		}
	});

	res.send({
		pages: orders.length/PAGE_SIZE,
		orders: orders.slice((page - 1) * PAGE_SIZE, page * PAGE_SIZE)
	});
	}
);

/**
 * corresponds to getProductWithSize of api.ts. returns details regarding the item corresponding to id given.
 */
app.get('/api/items/:itemId', (req, res) => {
	const itemId = <string


* @ordered
	 */
	protected static final Direction DIRECTION_EDEFAULT = Direction.LOCAL;

	/**
	 * The cached value of the '{@link #getDirection() Direction}' attribute.
	 *
	 *
	 * @see #getDirection()
	 * @generated
	 * @ordered
	 */
	protected Direction direction = DIRECTION_EDEFAULT;

	/**
	 *
	 *
	 * @generated
	 */
	public ExecutionEventImpl() {
		super();
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return SRuntimePackage.Literals.EXECUTION_EVENT;
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public boolean isRaised() {
		return raised;
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void setRaised(boolean newRaised) {
		boolean oldRaised = raised;
		raised = newRaised;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, SRuntimePackage.EXECUTION_EVENT__RAISED, oldRaised, raised));
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public Direction getDirection() {
		return direction;
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void setDirection(Direction newDirection) {
		Direction oldDirection = direction;
		direction = newDirection == null ? DIRECTION_EDEFAULT : newDirection;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, SRuntimePackage.EXECUTION_EVENT__DIRECTION, oldDirection, direction));
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case SRuntimePackage.EXECUTION_EVENT__RAISED:
				return isRaised();
			case SRuntimePackage.EXECUTION_EVENT__DIRECTION:
				return getDirection();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case SRuntimePackage.EXECUTION_EVENT__RAISED:
				setRaised((Boolean)newValue);
				return;
			case SRuntimePackage.EXECUTION_EVENT__DIRECTION:
				setDirection((Direction)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case SRuntimePackage.EXECUTION_EVENT__RAISED:
				setRaised(RAISED_EDEFAULT);
				return;
			case SRuntimePackage.EXECUTION_EVENT__DIRECTION:
				setDirection(DIRECTION_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case SRuntimePackage.EXECUTION_EVENT__RAISED:
				return raised != RAISED_EDEFAULT;
			case


using System;
using StreamChat.Core.InternalDTO.Models;
using StreamChat.Core.InternalDTO.Requests;
using StreamChat.Core.LowLevelClient;

namespace StreamChat.Core.Requests
{
    public sealed class StreamChannelMemberRequest : ISavableTo<ChannelMemberRequestInternalDTO>, ISavableTo<ChannelMemberInternalDTO>
    {
        /// <summary>
        /// Expiration date of the ban
        /// </summary>
        public DateTimeOffset? BanExpires { get; set; }

        /// <summary>
        /// Whether member is banned this channel or not
        /// </summary>
        public bool? Banned { get; set; }

        /// <summary>
        /// Role of the member in the channel
        /// </summary>
        public string ChannelRole { get; set; }

        /// <summary>
        /// Whether member is channel moderator or not
        /// </summary>
        public bool? IsModerator { get; set; }

        /// <


unssfsi

	.global	__fixunssfsi
	.type	__fixunssfsi, @function
__fixunssfsi:
	push    $lp

	slli    $r1, $r0, #8
	move    $r3, #0x80000000
	or      $r1, $r1, $r3
	srli    $r3, $r0, #23
	andi    $r3, $r3, #0xff
	subri   $r2, $r3, #0x9e
	sltsi   $r15, $r2, #0
	bnezs8  .LLspec
	sltsi   $r15, $r2, #0x20
	bnezs8  .Li45
	move    $r0, #0
	j       .LL999
.Li45:
	srl     $r1, $r1, $r2
	sltsi   $r15, $r0, #0
	beqzs8  .Li46
	subri   $r1, $r1, #0
.Li46:
	move    $r0, $r1

.LL999:
	pop     $lp
	ret5    $lp

.LLspec:
	move    $r3, #0x7f800000
	slt     $r15, $r3, $r0
	beqzs8  .Li47
	move    $r0, #0x80000000
	j       .LL999
.Li47:
	move    $r0, #-1
	j       .LL999
	.size	__fixunssfsi, .-__fixunssfsi
#endif /* L_fixunssfsi */

#ifdef L_fixunsdfsi

#ifndef __big_endian__
	#define P1L     $r0
	#define P1H     $r1
#else
	#define P1H     $r0
	#define P1L     $r1
#endif
	.text
	.align	2
	.global	__fixunsdfsi
	.type	__fixunsdfsi, @function
__fixunsdfsi:
	push    $lp
	pushm   $r6, $r6

	slli    $r3, P1H, #11
	srli    $r6, P1L, #21
	or      $r3, $r3, $r6
	move    $r6, #0x80000000
	or      $r3, $r3, $r6
	slli    $r6, P1H, #1
	srli    $r6, $r6, #21
	subri   $r2, $r6, #0x41e
	sltsi   $r15, $r2, #0
	bnezs8  .LNnaninf
	move    $r6, #0x20
	slt     $r15, $r2, $r6
	bnezs8  .LL73
	move    $r3, #0
.LL73:
	srl     $r3, $r3, $r2
	sltsi   $r15, P1H, #0
	beqzs8  .Li53
	subri   $r3, $r3, #0
.Li53:
	move    $r0, $r3

.LN999:
	popm    $r6, $r6
	pop     $lp
	ret5    $lp

.LNnaninf:
	beqz    P1L, .Li54
	ori     P1H, P1H, #1
.Li54:
	move    $r6, #0x7ff00000
	slt     $r15, $r6, P1H
	beqzs8  .Li55
	move    $r0, #0x80000000
	j       .LN999
.Li55:
	move    $r0, #-1
	j       .LN999
	.size __fixunsdfsi, .-__fixunsdfsi
#endif


/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * This file contains miscellaneous low-level functions.
 *    Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
 *
 * Largely rewritten by Cort Dougan (cort@cs.nmt.edu)
 * and Paul Mackerras.
 * Adapted for iSeries by Mike Corrigan (mikejc@us.ibm.com)
 * PPC64 updates by Dave Engebretsen (engebret@us.ibm.com)
 */

#include <linux/export.h>
#include <linux/linkage.h>
#include <linux/sys.h>
#include <asm/unistd.h>
#include <asm/errno.h>
#include <asm/processor.h>
#include <asm/page.h>
#include <asm/cache.h>
#include <asm/ppc_asm.h>
#include <asm/asm-offsets.h>
#include <asm/cputable.h>
#include <asm/thread_info.h>
#include <asm/kexec.h>
#include <asm/ptrace.h>
#include <asm/mmu.h>
#include <asm/feature-fixups.h>

	.text

_GLOBAL(__bswapdi2)
EXPORT_SYMBOL(__bswapdi2)
	srdi	r8,r3,32
	rlwinm	r7,r3,8,0xffffffff
	rlwimi	r7,r3,24,0,7
	rlwinm	r9,r8,8,0xffffffff
	rlwimi	r7,r3,24,16,23
	rlwimi	r9,r8,24,0,7
	rlwimi	r9,r8,24,16,23
	sldi	r7,r7,32
	or	r3,r7,r9
	blr

#ifdef CONFIG_PPC_EARLY_DEBUG_BOOTX
_GLOBAL(rmci_on)
	sync
	isync
	li	r3,0x100
	rldicl	r3,r3,32,0
	mfspr	r5,SPRN_HID4
	or	r5,r5,r3
	sync
	mtspr	SPRN_HID4,r5
	isync
	slbia
	isync
	sync
	blr

_GLOBAL(rmci_off)
	sync
	isync
	li	r3,0x100
	rldicl	r3,r3,32,0
	mfspr	r5,SPRN_HID4
	andc	r5,r5,r3
	sync
	mtspr	SPRN_HID4,r5
	isync
	slbia
	isync
	sync
	blr
#endif /* CONFIG_PPC_EARLY_DEBUG_BOOTX */

#ifdef CONFIG_PPC_PMAC

/*
 * Do an IO access in real mode
 */
_GLOBAL(real_readb)
	mfmsr	r7
	ori	r0,r7,MSR_DR
	xori	r0,r0,MSR_DR
	sync
	mtmsrd	r0
	sync
	isync
	mfspr	r6,SPRN_HID4
	rldicl	r5,r6,32,0
	ori	r5,r5,0x100
	rldicl	r5,r5,32,0
	sync
	mtspr	SPRN_HID4,r5
	isync
	slbia
	isync
	lbz	r3,0(r3)
	sync
	mtspr	SPRN_HID4,r6
	isync
	slbia
	isync
	mtmsrd	r7
	sync
	isync
	blr

	/*
 * Do an IO access in real mode
 */
_GLOBAL(real_writeb)
	mfmsr	r7
	ori	r0,r7,MSR_DR
	xori	r0,r0,MSR_DR
	sync
	mtmsrd	r0
	sync
	isync
	mfspr	r6,SPRN_HID4
	rldicl


= fieldSelector
			return dynamicClient.Resource(resource).Namespace(namespace).Watch(ctx, options)
		},
	}
	_, err := watchtools.UntilWithSync(
		ctx,
		lw,
		&unstructured.Unstructured{},
		func(store cache.Store) (bool, error) {
			obj, exists, err := store.Get(&metav1.ObjectMeta{Namespace: namespace, Name: name})
			if err != nil {
				return true, err
			}
			if !exists {
				return true, nil
			}

			objMeta, err := meta.Accessor(obj)
			if err != nil {
				return true, errors.New("can't get object metadata")
			}

			objUID := objMeta.GetUID()
			if uid != nil && *uid != objUID {
				return true, nil
			}

			uid = &objUID

			return false, nil
		},
		func(e watch.Event) (bool, error) {
			switch t := e.Type; t {
			case watch.Added, watch.Bookmark:
				return false, nil
			case watch.Modified:
				// DeltaFIFO can return modified event on re-list if the object is recreated in the meantime
				if e.Object.(metav1.Object).GetUID() != *uid {
					return true, nil
				}
				return false, nil
			case watch.Deleted:
				return true, nil
			case watch.Error:
				return true, apierrors.FromObject(e.Object)
			default:
				return true, fmt.Errorf("unexpected event type %v", t)
			}
		},
	)
	if err != nil {
		return err
	}

	return nil
}

func DumpEventsInNamespace(ctx context.Context, c kubernetes.Interface, namespace string) {
	events, err := c.CoreV1().Events(namespace).List(ctx, metav1.ListOptions{})
	o.Expect(err).NotTo(o.HaveOccurred())

	By("Found %d events.", len(events.Items))
	// Sort events by their first timestamp
	sortedEvents := events.Items
	if len(sortedEvents) > 1 {
		sort.Slice(sortedEvents, func(i, j int) bool {
			if sortedEvents[i].FirstTimestamp.Equal(&sortedEvents[j].FirstTimestamp) {
				return sortedEvents[i].InvolvedObject.Name < sortedEvents[j].InvolvedObject.Name
			}
			return sortedEvents[i].FirstTimestamp.Before(&sortedEvents[j].FirstTimestamp)
		})
	}
	for _, e := range sortedEvents {
		Infof("At %v - event for %v: %v %v: %v", e.FirstTimestamp, e.InvolvedObject.Name, e.Source, e.Reason, e.Message)
	}
}

func FieldManager(userAgent, namespace string) string {
	h := sha512.Sum512([]byte(fmt.Sprintf("%s-%s", userAgent, namespace)))
	return base64.StdEncoding.EncodeToString(h[:])
}
// Copyright (c) 2021 ScyllaDB

package utils

import (
	"context"
	"fmt"
	"sort"
	"strings"
	"time"

	"github.com/gocql/gocql"
	"github.com/scylladb/gocqlx/v2"
	"github.com/scylladb/gocqlx/v2/table"
	"github.com/scylladb/scylla-operator/pkg/helpers"
	oslices "github.com/scylladb/scylla-operator/pkg/helpers/slices"
	"github.com/scylladb/scylla-operator/test/e2e/framework"
	apimachineryutilrand "k8s.io/apimachinery/pkg/util/rand"
)

const nRows = 10

type DataInserter struct {
	session           *gocqlx.Session
	keys


�енерал Везакс",nil},
[33272] = {"Манекен для стремительной атаки",nil},
[33273] = {"Дева Драк'Мара",nil},
[33274] = {"Механобип",nil},
[33280] = {"Голос Йогг-Сарона",nil},
[33282] = {"Razorscale Harpoon Fire State",nil},
[33285] = {"Искатель славы из деревни Сен'джин",nil},
[33286] = {"Элвиннский лесной волк",nil},
[33287] = {"Инженер экспедиции",nil},
[33288] = {"Йогг-Сарон",nil},
[33289] = {"Лорд Вечнопылающий",nil},
[33290] = {"Джиллиан Максоус","Прелестнейшая из Максоусов"},
[33291] = {"Огненная танцовщица",nil},
[33292] = {"Зловещее облако",nil},
[33293] = {"Разрушитель XT-002",nil},
[33297] = {"Штормградский скакун",nil},
[33298] = {"Дарнасский ночной саблезуб",nil},
[33299] = {"Ящер Черного Копья",nil},
[33300] = {"Кодо Громового Утеса",nil},
[33301] = {"Гномреганский механодолгоног",nil},
[33303] = {"Дева озера Дыхания Зимы",nil},
[33306] = {"Искатель славы из Оргриммара",nil},
[33307] = {"Капрал Артур Флю","Интедант Штормграда"},
[33308] = {"Дуб Хрустальной Песни",nil},
[33309] = {"Клара Взубногой","Хозяйка баранов"},
[33310] = {"Деррик Пегобород","Интендант Стальгорна"},
[33312] = {"Лана Твердомолот","Абсолютный чемпион Стальгорна"},
[33314] = {"Гном Джером",nil},
[33315] = {"Ролло Меткострел","Мастер владения оружием"},
[33316] = {"Стальгорнский баран",nil},
[33317] = {"Гномреганский механодолгоног",nil},
[33318] = {"Экзодарский элекк",nil},
[33319] = {"Дарнасский ночной саблезуб",nil},
[33320] = {"Оргриммарский волк",nil},
[33321] = {"Ящер Черного Копья",nil},
[33322] = {"Кодо Громового Утеса",nil},
[33323] = {"Крылобег Луносвета",nil},
[33324] = {"Боевой конь Отрекшихся",nil},
[33325] = {"Эйви Ночное Перо",nil},
[33326] = {"Полевой врач Джесси",nil},
[33327] = {"Зисси Огняш",nil},
[33328] = {"Повелитель стихий Мафуун",nil},
[33329] = {"Сердце Разрушителя",nil},
[33330] = {"Боева


/reference/count.html)(domain_id, isRxnorm) [%>%](pipe.html)
      appendPermanent("rxnorm_count")

    DBI::[dbDisconnect](https://dbi.r-dbi.org/reference/dbDisconnect.html)(con, shutdown = TRUE)

    } # }

## On this page

Developed by Adam Black, Artem Gorbachev, Edward Burn, Marti Catala Sabate, Ioanna Nika.

Site built with [pkgdown](https://pkgdown.r-lib.org/) 2.1.1.

---

## Content from https://darwin-eu.github.io/CDMConnector/reference/asDate.html

Skip to contents

[CDMConnector](../index.html) 2.2.0

  * [Reference](../reference/index.html)
  * Articles
    * [Getting Started](../articles/a01_getting-started.html)
    * [Working with cohorts](../articles/a02_cohorts.html)
    * [CDMConnector and dbplyr](../articles/a03_dbplyr.html)
    * [DBI connection examples](../articles/a04_DBI_connection_examples.html)
    * [Using CDM attributes](../articles/a06_using_cdm_attributes.html)
  * [Changelog](../news/index.html)

  *   * [](https://github.com/darwin-eu/CDMConnector/)

![](../logo.png)

# as.Date dbplyr translation wrapper

Source: [`R/dateadd.R`](https://github.com/darwin-eu/CDMConnector/blob/HEAD/R/dateadd.R)

`asDate.Rd`

This is a workaround for using as.Date inside dplyr verbs against a database backend. This function should only be used inside dplyr verbs where the first argument is a database table reference. `asDate` must be unquoted with !! inside dplyr verbs (see example).

## Usage

    asDate(x)

## Arguments

x

an R expression

## Examples

    if (FALSE) { # \dontrun{
    con <- DBI::[dbConnect](https://dbi.r-dbi.org/reference/dbConnect.html)(odbc::[odbc](https://odbc.r-dbi.org/reference/dbConnect-OdbcDriver-method.html)(), "Oracle")
    date_tbl <- dplyr::[copy_to](https://dplyr.tidyverse.org/reference/copy_to.html)(con,
                               [data.frame](https://rdrr.io/r/base/data.frame.html)(y = 2000L, m = 10L, d = 10L),
                               name = "tmp",
                               temporary = TRUE)

    df <- date_tbl [%>%](pipe.html)
      dplyr::[mutate](https://dplyr.tidyverse.org/reference/mutate.html)(date_from_parts = !!asDate([paste0](https://rdrr.io/r/base/paste.html)(
        .data$y, "/",
        .data$m, "/",
        .data$d
      ))) [%>%](pipe.html)
      dplyr::[collect](https://dplyr.tidyverse.org/reference/compute.html)()
    } # }

## On this page

Developed by Adam Black, Artem Gorbachev, Edward Burn, Marti Catala Sabate, Ioanna Nika.

Site built with [pkgdown](https://pkgdown.r-lib.org/) 2.1.1.

---

## Content from https://darwin-eu.github.io/CDMConnector/reference/computeQuery.html

Skip to contents

[CDMConnector](../index.html) 2.2.0

  * [Reference](../reference/index.html)
  * Articles
    * [Getting Started](../articles/a01_getting-started.html)
    * [Working with cohorts](../article


U8U8;
	}
	else if ((itypeA == VX_DF_IMAGE_S16) && (itypeB == VX_DF_IMAGE_U8) && (otype == VX_DF_IMAGE_S16)) {
		new_kernel_id = (convert_policy == VX_CONVERT_POLICY_SATURATE) ? VX_KERNEL_AMD_ADD_S16_S16U8_SAT : VX_KERNEL_AMD_ADD_S16_S16U8_WRAP;
	}
	else if ((itypeA == VX_DF_IMAGE_U8) && (itypeB == VX_DF_IMAGE_S16) && (otype == VX_DF_IMAGE_S16)) {
		new_kernel_id = (convert_policy == VX_CONVERT_POLICY_SATURATE) ? VX_KERNEL_AMD_ADD_S16_S16U8_SAT : VX_KERNEL_AMD_ADD_S16_S16U8_WRAP;
		// switch A & B parameters
		anode->paramList[1] = paramList[1];
		anode->paramList[2] = paramList[0];
	}
	else if ((itypeA == VX_DF_IMAGE_S16) && (itypeB == VX_DF_IMAGE_S16) && (otype == VX_DF_IMAGE_S16)) {
		new_kernel_id = (convert_policy == VX_CONVERT_POLICY_SATURATE) ? VX_KERNEL_AMD_ADD_S16_S16S16_SAT : VX_KERNEL_AMD_ADD_S16_S16S16_WRAP;
	}
	return agoDramaDivideAppend(nodeList, anode, new_kernel_id);
}

int agoDramaDivideSubtractNode(AgoNodeList * nodeList, AgoNode * anode)
{
	// sanity checks
	if (anode->paramCount != 4) return -1;
	SANITY_CHECK_DATA_TYPE(anode->paramList[0], VX_TYPE_IMAGE);
	SANITY_CHECK_DATA_TYPE(anode->paramList[1], VX_TYPE_IMAGE);
	SANITY_CHECK_DATA_TYPE(anode->paramList[2], VX_TYPE_SCALAR);
	SANITY_CHECK_DATA_TYPE(anode->paramList[3], VX_TYPE_IMAGE);
	// get and re-order parameters
	AgoData * paramList[AGO_MAX_PARAMS]; memcpy(paramList, anode->paramList, sizeof(paramList));
	vx_uint32 paramCount = anode->paramCount;
	vx_df_image otype = paramList[3]->u.img.format;
	vx_df_image itypeA = paramList[0]->u.img.format;
	vx_df_image itypeB = paramList[1]->u.img.format;
	vx_enum convert_policy = paramList[2]->u.scalar.u.e;
	anode->paramList[0] = paramList[3];
	anode->paramList[1] = paramList[0];
	anode->paramList[2] = paramList[1];
	anode->paramCount = 3;
	// divide
	vx_enum new_kernel_id = VX_KERNEL_AMD_INVALID;
	if (otype == VX_DF_IMAGE_U8) {
		if ((itypeA == VX_DF_IMAGE_U8) && (itypeB == VX_DF_IMAGE_U8)) {
			new_kernel_id = (convert_policy == VX_CONVERT_POLICY_SATURATE) ? VX_KERNEL_AMD_SUB_U8_U8U8_SAT : VX_KERNEL_AMD_SUB_U8_U8U8_WRAP;
		}
	}
	else if (otype == VX_DF_IMAGE_S16) {
		if ((itypeA == VX_DF_IMAGE_U8) && (itypeB == VX_DF_IMAGE_U8)) {


ssage);

            await Task.Delay(500);
        }
    }

    [Fact(DisplayName = "2,累加计数Actor")]
    public void TestInc()
    {
        using var actor = new TestActor();
        actor.BoundedCapacity = 200;
        actor.BatchSize = 100;

        XTrace.WriteLine("TestCount Start");
        for (var i = 0; i < 1000; i++)
        {
            actor.Tell(i);
        }

        XTrace.WriteLine("TestCount Finishing");

        actor.Stop();
        Assert.True(actor.Total < 1000);

        actor.Stop(-1);
        Assert.Equal(1000, actor.Total);

        XTrace.WriteLine("TestCount End");

        Thread.Sleep(5000);
        XTrace.WriteLine("End");
    }

    private class TestActor : Actor
    {
        public Int32 Total { get; set; }

        protected override async Task ReceiveAsync(ActorContext[] contexts, CancellationToken cancellationToken)
        {
            Total += contexts.Length;
            XTrace.WriteLine("Total={0}", Total);

            await Task.Delay(500);
        }
    }
}