.tuxguitar.app.view.controller.TGViewContext;
import app.tuxguitar.app.view.util.TGDialogUtil;
import app.tuxguitar.document.TGDocumentContextAttributes;
import app.tuxguitar.editor.action.TGActionProcessor;
import app.tuxguitar.editor.action.composition.TGChangeInfoAction;
import app.tuxguitar.song.models.TGSong;
import app.tuxguitar.ui.UIFactory;
import app.tuxguitar.ui.event.UISelectionEvent;
import app.tuxguitar.ui.event.UISelectionListener;
import app.tuxguitar.ui.layout.UITableLayout;
import app.tuxguitar.ui.widget.UIButton;
import app.tuxguitar.ui.widget.UILabel;
import app.tuxguitar.ui.widget.UILegendPanel;
import app.tuxguitar.ui.widget.UIPanel;
import app.tuxguitar.ui.widget.UITextArea;
import app.tuxguitar.ui.widget.UITextField;
import app.tuxguitar.ui.widget.UIWindow;
import app.tuxguitar.util.TGContext;

public class TGSongInfoDialog {

	private static final float GROUP_WIDTH = 450;

	public void show(final TGViewContext context) {
		final TGSong song = context.getAttribute(TGDocumentContextAttributes.ATTRIBUTE_SONG);

		UIFactory uiFactory = TGApplication.getInstance(context.getContext()).getFactory();
		UIWindow uiParent = context.getAttribute(TGViewContext.ATTRIBUTE_PARENT);
		UITableLayout dialogLayout = new UITableLayout();
		final UIWindow dialog = uiFactory.createWindow(uiParent, true, false);
		dialog.setLayout(dialogLayout);
		dialog.setText(TuxGuitar.getProperty("composition.properties"));

		UITableLayout groupLayout = new UITableLayout();
		UILegendPanel group = uiFactory.createLegendPanel(dialog);
		group.setText(TuxGuitar.getProperty("composition.properties"));
		group.setLayout(groupLayout);
		dialogLayout.set(group, 1, 1, UITableLayout.ALIGN_FILL, UITableLayout.ALIGN_FILL, true, true, 1, 1, GROUP_WIDTH, null, null);

		//-------NAME------------------------------------
		UILabel nameLabel = uiFactory.createLabel(group);
		nameLabel.setText(TuxGuitar.getProperty("composition.name") + ":");
		groupLayout.set(nameLabel, 1, 1, UITableLayout.ALIGN_RIGHT, UITableLayout.ALIGN_CENTER, false, true);

		final UITextField nameText = uiFactory.createTextField(group);
		nameText.setText(song.getName());
		groupLayout.set(nameText, 1, 2, UITableLayout.ALIGN_FILL, UITableLayout.ALIGN_FILL, true, true);
		//-------ARTIST------------------------------------
		UILabel artistLabel = uiFactory.createLabel(group);
		artistLabel.setText(TuxGuitar.getProperty("composition.artist") + ":");
		groupLayout.set(artistLabel, 2, 1, UITableLayout.ALIGN_RIGHT, UITableLayout.ALIGN_CENTER, false, true);

		final UITextField artistText = uiFactory.createTextField(group);
		artistText.setText(song.getArtist());
		groupLayout.set(artistText, 2, 2, UITableLayout.ALIGN_FILL, UITableLayout.ALIGN_FILL, true, true);
		//-------ALBUM------------------------------------
		UILabel albumLabel = uiFactory.createLabel(group);
		albumLabel.setText(TuxGuitar.getProperty("composition.album") + ":");
		groupLayout.set(albumLabel, 3, 1, UITableLayout.ALIGN_RIGHT, UITableLayout.ALIGN_CENTER, false, true);

		final UITextField albumText = uiFactory.createTextField(group);
		albumText.setText(song.getAlbum());
		groupLayout.set(albumText, 3, 2, UITableLayout


read the frei0r section in the video filters
documentation.

<samp>filter_params</samp>

A ’|’-separated list of parameters to pass to the frei0r source.

For example, to generate a frei0r partik0l source with size 200x200
and frame rate 10 which is overlaid on the overlay filter main input:

frei0r_src=size=200x200:framerate=10:filter_name=partik0l:filter_params=1234 [overlay]; [in][overlay] overlay

14.8 life# TOC

Generate a life pattern.

This source is based on a generalization of John Conway’s life game.

The sourced input represents a life grid, each pixel represents a cell
which can be in one of two possible states, alive or dead. Every cell
interacts with its eight neighbours, which are the cells that are
horizontally, vertically, or diagonally adjacent.

At each interaction the grid evolves according to the adopted rule,
which specifies the number of neighbor alive cells which will make a
cell stay alive or born. The <samp>rule</samp> option allows one to specify
the rule to adopt.

This source accepts the following options:

<samp>filename, f</samp>

Set the file from which to read the initial grid state. In the file,
each non-whitespace character is considered an alive cell, and newline
is used to delimit the end of each row.

If this option is not specified, the initial grid is generated
randomly.

<samp>rate, r</samp>

Set the video rate, that is the number of frames generated per second.
Default is 25.

<samp>random_fill_ratio, ratio</samp>

Set the random fill ratio for the initial random grid. It is a
floating point number value ranging from 0 to 1, defaults to 1/PHI.
It is ignored when a file is specified.

<samp>random_seed, seed</samp>

Set the seed for filling the initial random grid, must be an integer
included between 0 and UINT32_MAX. If not specified, or if explicitly
set to -1, the filter will try to use a good random seed on a best
effort basis.

<samp>rule</samp>

Set the life rule.

A rule can be specified with a code of the kind "S<var>NS</var>/B<var>NB</var>",
where <var>NS</var> and <var>NB</var> are sequences of numbers in the range 0-8,
<var>NS</var> specifies the number of alive neighbor cells which make a
live cell stay alive, and <var>NB</var> the number of alive neighbor cells
which make a dead cell to become alive (i.e. to "born").
"s" and "b" can be used in place of "S" and "B", respectively.


px solid #000;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  border-left: 1px solid #000;
  background-color: #b8c0c4;
}

/* The body part -- contains all the days in month. */

.calendar tbody .day { /* Cells <TD> containing month days dates */
  width: 2em;
  text-align: right;
  padding: 2px 4px 2px 2px;
}
.calendar tbody .day.othermonth {
  font-size: 80%;
  color: #aaa;
}
.calendar tbody .day.othermonth.oweekend {
  color: #faa;
}

.calendar table .wn {
  padding: 2px 3px 2px 2px;
  border-right: 1px solid #000;
  background: #e8f4f0;
}

.calendar tbody .rowhilite td {
  background: #d8e4e0;
}

.calendar tbody .rowhilite td.wn {
  background: #c8d4d0;
}

.calendar tbody td.hilite { /* Hovered cells <TD> */
  padding: 1px 3px 1px 1px;
  border: 1px solid;
  border-color: #fff #000 #000 #fff;
}

.calendar tbody td.active { /* Active (pressed) cells <TD> */
  padding: 2px 2px 0px 2px;
  border: 1px solid;
  border-color: #000 #fff #fff #000;
}

.calendar tbody td.selected { /* Cell showing selected date */
  font-weight: bold;
  padding: 2px 2px 0px 2px;
  border: 1px solid;
  border-color: #000 #fff #fff #000;
  background: #d8e0e4;
}

.calendar tbody td.weekend { /* Cells showing weekend days */
  color: #f00;
}

.calendar tbody td.today { /* Cell showing today date */
  font-weight: bold;
  color: #00f;
}

.calendar tbody .disabled { color: #999; }

.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
  visibility: hidden;
}

.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
  display: none;
}

/* The footer part -- status bar and "Close" button */

.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
}

.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
  background: #e8f0f4;
  padding: 1px;
  border: 1px solid #000;
  background: #788084;
  color: #fff;
  text-align: center;
}

.calendar tfoot .hilite { /* Hover style for buttons in footer */
  border-top: 1px solid #fff;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  border-left: 1px solid #fff;
  padding: 1px;
  background: #d8e0e4;
}

.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
  padding: 2px 0px 0px 2px;
  border-top: 1px solid #000;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  border-left: 1px solid #000;
}

/* Combo boxes (menus that display months/years for direct selection) */

.calendar .combo {
  positi


Connection.disConnect(null);
            mqttConnection = null;
        }
    }

    private class DoorMqttActionCallBack extends TXMqttActionCallBack {

        @Override
        public void onConnectCompleted(Status status, boolean reconnect, Object userContext, String msg, Throwable cause) {
            TXLog.i(TAG, "onConnectCompleted：" + msg);

            if (status.equals(Status.OK)) {
                if (!reconnect) {
                    MqttMessage message = new MqttMessage();
                    message.setPayload(COME_HOME_MESSAGE.getBytes());
                    String topic = String.format("%s/%s/%s", PRODUCT_ID, DEVICE_NAME, "event");
                    mqttConnection.publish(topic, message, null);
                }
            }
        }

        @Override
        public void onConnectionLost(Throwable cause) {
            String logInfo = String.format("onConnectionLost, cause[%s]", cause.toString());
            TXLog.i(TAG, logInfo);
        }

        @Override
        public void onDisconnectCompleted(Status status, Object userContext, String msg, Throwable cause) {
            String logInfo = String.format("onDisconnectCompleted, status[%s], msg[%s]", status.name(), msg);
            TXLog.i(TAG, logInfo);
        }

        @Override
        public void onSubscribeCompleted(Status status, IMqttToken token, Object userContext, String msg, Throwable cause) {
            String logInfo = String.format("onSubscribeCompleted, status[%s], message[%s]", status.name(), msg);
            if (Status.ERROR == status) {
                TXLog.e(TAG, logInfo);
            } else {
                TXLog.i(TAG, logInfo);
            }
        }

        @Override
        public void onPublishCompleted(Status status, IMqttToken token, Object userContext, String msg, Throwable cause) {
            super.onPublishCompleted(status, token, userContext, msg, cause);
        }
    }
}
package com.tencent.tic.demo.activities;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;
import android.widget.FrameLayout;

import com.tencent.smtt.sdk.WebSettings;
import com.tencent.smtt.sdk.WebView;
import com.tencent.smtt.sdk.WebViewClient;
import com.tencent.tic.core.IMManager;
import com.tencent.tic.demo.R;

import java.util.Random;

public class TICClassManagerActivity extends BaseActvity {

    // 课堂id
    EditText etRoomIdInput;

    WebView mWebView;
    FrameLayout webviewContainer;

    // IM掉线
    @Override
    public void onConnectFailed(int code, String error) {
        finish();
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_manager_layout);

        //用户信息
        mUserID = getIntent().getStringExtra(USER_ID);
        mUserSig = getIntent().getStringExtra(USER_SIG);

        mRoomId = resumeFromCache();

        etRoomIdInput = (EditText) findViewById(R.id.et_roomid);

        etRoomIdInput.setText(String.valueOf(mRoomId));

        initwebView();

        webviewContainer = (FrameLayout) findViewById(R.id.webview_container);
        FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT);
        webviewContainer.addView(mWebView,


 err = s.Total(ctx)
		wait <- struct{}{}
	}()

	<-wait
	require.NoError(tb, err)
	require.Equal(tb, want, size)
}

// generateSampleFile generates a temp file of sample data with the
// specified number of rows. It is the caller's responsibility to
// close the file. Note that the file is removed by t.Cleanup.
func generateSampleFile(tb testing.TB, rows int) (size int, fp string) {
	f, err := os.CreateTemp("", "")
	require.NoError(tb, err)
	fp = f.Name()

	const line = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z"
	for i := 0; i < rows; i++ {
		// Actual data lines will look like:
		//  0,A,B,C...
		//  1,A,B,C...
		s := strconv.Itoa(i) + "," + line
		_, err = fmt.Fprintln(f, s)
		require.NoError(tb, err)
	}

	require.NoError(tb, f.Close())
	fi, err := os.Stat(fp)
	require.NoError(tb, err)
	size = int(fi.Size())
	tb.Logf("Generated sample file [%d]: %s", size, fp)
	return int(fi.Size()), fp
}

func sleepJitter() {
	const jitterFactor = 30
	d := time.Millisecond * time.Duration(mrand.Intn(jitterFactor))
	time.Sleep(d)
}
/*
 * Copyright (c) 2014-2017 MongoDB, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the license is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package gowin32

import (
	"github.com/winlabs/gowin32/wrappers"

	"syscall"
	"unsafe"
)

type VerRelOp uint8

const (
	VerEqual        VerRelOp = wrappers.VER_EQUAL
	VerGreater      VerRelOp = wrappers.VER_GREATER
	VerGreaterEqual VerRelOp = wrappers.VER_GREATER_EQUAL
	VerLess         VerRelOp = wrappers.VER_LESS
	VerLessEqual    VerRelOp = wrappers.VER_LESS_EQUAL
)

type VerLogOp uint8

const (
	VerAnd VerLogOp = wrappers.VER_AND
	VerOr  VerLogOp = wrappers.VER_OR
)

type VerPlatform uint32

const (
	VerPlatformWin32s    VerPlatform = wrappers.VER_PLATFORM_WIN32s
	VerPlatformWindows9x VerPlatform = wrappers.VER_PLATFORM_WIN32_WINDOWS
	VerPlatformWindowsNT VerPlatform = wrappers.VER_PLATFORM_WIN32_NT
)

type VerSuite uint16

const (
	VerSuiteSmallBusiness           VerSuite = wrappers.VER_SUITE_SMALLBUSINESS
	VerSuiteEnterprise              VerSuite = wrappers.VER_SUITE_ENTERPRISE
	VerSuiteBackOffice              VerSuite = wrappers.VER_SUITE_BACKOFFICE
	VerSuiteCommunications          VerSuite = wrappers.VER_SUITE_COMMUNICATIONS
	VerSuiteTerminal                VerSuite = wrappers.VER_SUITE_TERMINAL
	VerSuiteSmallBusinessRestricted VerSuite = wrappers.VER_SUITE_SMALLBUSINESS_RESTRICTED
	VerSuiteEmbeddedNT              VerSuite = wrappers.VER_SUITE_EMBEDDEDNT
	VerSuiteDataCenter              VerSuite


   for (int i = 0; i < 12; i++)
        Assert.IsTrue(Numeric.AreEqual(rowMajor[i] / s, m[i]));
    }

    [Test]
    public void DivideByScalar()
    {
      float s = 0.1234f;
      MatrixF m = new MatrixF(3, 4, rowMajor, MatrixOrder.RowMajor);
      m = MatrixF.Divide(m, s);
      for (int i = 0; i < 12; i++)
        Assert.IsTrue(Numeric.AreEqual(rowMajor[i] / s, m[i]));
    }

    [Test]
    [ExpectedException(typeof(ArgumentNullException))]
    public void DivideByScalarException()
    {
      float s = 1.0f;
      MatrixF m = null;
      m = MatrixF.Divide(m, s);
    }

    [Test]
    public void MultiplyMatrixOperator()
    {
      float[] values = new float[] { 12, 23, 45, 56,
                                     67, 89, 90, 12,
                                     43, 65, 87, 43,
                                     34, -12, 84, 44 };
      MatrixF m = new MatrixF(4, 4, values, MatrixOrder.RowMajor);
      Assert.AreEqual(new MatrixF(4, 4), m * new MatrixF(4, 4));
      Assert.AreEqual(new MatrixF(4, 4), new MatrixF(4, 4) * m);
      Assert.AreEqual(m, m * MatrixF.CreateIdentity(4, 4));
      Assert.AreEqual(m, MatrixF.CreateIdentity(4, 4) * m);
      Assert.IsTrue(MatrixF.AreNumericallyEqual(MatrixF.CreateIdentity(4, 4), m * m.Inverse));
      Assert.IsTrue(MatrixF.AreNumericallyEqual(MatrixF.CreateIdentity(4, 4), m.Inverse * m));

      MatrixF m1 = new MatrixF(3, 4, rowMajor, MatrixOrder.RowMajor);
      MatrixF m2 = new MatrixF(4, 4, values, MatrixOrder.RowMajor);

      MatrixF result = m1 * m2;
      Assert.AreEqual(3, result.NumberOfRows);
      Assert.AreEqual(4, result.NumberOfColumns);
      for (int column = 0; column < 4; column++)
        for (int row = 0; row < 3; row++)
          Assert.AreEqual(VectorF.Dot(m1.GetRow(row), m2.GetColumn(column)), result[row, column]);
    }

    [Test]
    public void MultiplyMatrix()
    {
      float[] values = new float[] { 12, 23, 45, 56,
                                     67, 89, 90, 12,
                                     43, 65, 87, 43,
                                     34, -12, 84, 44 };
      MatrixF m = new MatrixF(4, 4, values, MatrixOrder.RowMajor);
      Assert.AreEqual(new MatrixF(4, 4), MatrixF.Multiply(m, new MatrixF(4, 4)));
      Assert.AreEqual(new MatrixF(4, 4), MatrixF.Multiply(new MatrixF(4, 4), m));
      Assert.AreEqual(m, MatrixF.Multiply(m, MatrixF.CreateIdentity(4, 4)));
      Assert.AreEqual(m, MatrixF.Multiply(MatrixF.CreateIdentity(4, 4), m));
      Assert.IsTrue(MatrixF.AreNumericallyEqual(MatrixF.CreateIdentity(4, 4), MatrixF.Multiply(m, m.Inverse)));
      Assert.IsTrue(MatrixF.AreNumericallyEqual(MatrixF.CreateIdentity(4, 4), MatrixF.Multiply(m.Inverse, m)));

      MatrixF m1 = new MatrixF(3, 4, rowMajor, MatrixOrder.RowMajor);
      MatrixF m2 = new MatrixF(4, 4, values, MatrixOrder.RowMajor);

      MatrixF result = MatrixF.Multiply(m1, m2);
      Assert.AreEqual(3, result.NumberOfRows);
      Assert.AreEqual(4, result.NumberOf


 multiline titles use the following to replace newlines by spaces
    static string title;
    title=_title;
    string::size_type j;
    for ( ; (j = title.find_first_of( "\n\r" )) != string::npos ; ) {
      title.replace( j, 1, " ");
    }

    return(title.c_str());
  }

  bool SortVVInt(const vector<int> &a,const vector<int> &b)
  {
    return(a.size() > b.size());
  }

  bool SortAtomZ(const pair<OBAtom*,double> &a, const pair<OBAtom*,double> &b)
  {
    return (a.second < b.second);
  }

  double OBMol::GetAngle( OBAtom* a, OBAtom* b, OBAtom* c)
  {
    return a->GetAngle( b, c );
  }

  double OBMol::GetTorsion(int a,int b,int c,int d)
  {
    return(GetTorsion((OBAtom*)_vatom[a-1],
                      (OBAtom*)_vatom[b-1],
                      (OBAtom*)_vatom[c-1],
                      (OBAtom*)_vatom[d-1]));
  }

  void OBMol::SetTorsion(OBAtom *a,OBAtom *b,OBAtom *c, OBAtom *d, double ang)
  {
    vector<int> tor;
    vector<int> atoms;

    obErrorLog.ThrowError(__FUNCTION__,
                          "Ran OpenBabel::SetTorsion", obAuditMsg);

    tor.push_back(a->GetCoordinateIdx());
    tor.push_back(b->GetCoordinateIdx());
    tor.push_back(c->GetCoordinateIdx());
    tor.push_back(d->GetCoordinateIdx());

    FindChildren(atoms, b->GetIdx(), c->GetIdx());
    int j;
    for (j = 0 ; (unsigned)j < atoms.size() ; j++ )
      atoms[j] = (atoms[j] - 1) * 3;

    double v2x,v2y,v2z;
    double radang,m[9];
    double x,y,z,mag,rotang,sn,cs,t,tx,ty,tz;

    //calculate the torsion angle
    // TODO: fix this calculation for periodic systems
    radang = CalcTorsionAngle(a->GetVector(),
                              b->GetVector(),
                              c->GetVector(),
                              d->GetVector()) / RAD_TO_DEG;
    //
    // now we have the torsion angle (radang) - set up the rot matrix
    //

    //find the difference between current and requested
    rotang = ang - radang;

    sn = sin(rotang);
    cs = cos(rotang);
    t = 1 - cs;

    v2x = _c[tor[1]]   - _c[tor[2]];
    v2y = _c[tor[1]+1] - _c[tor[2]+1];
    v2z = _c[tor[1]+2] - _c[tor[2]+2];

   //normalize the rotation vector
    mag = sqrt(SQUARE(v2x)+SQUARE(v2y)+SQUARE(v2z));
    x = v2x/mag;
    y = v2y/mag;
    z = v2z/mag;

    //set up the rotation matrix
    m[0]= t*x*x + cs;
    m[1] = t*x*y + sn*z;
    m[2] = t*x*z - sn*y;
    m[3] = t*x*y - sn*z;
    m[4] = t*y*y + cs;
    m[5] = t*y*z + sn*x;
    m[6] = t*x*z + sn*y;
    m[7] = t*y*z - sn*x;
    m[8] = t*z*z + cs;

    //
    //now the matrix is set - time to rotate the atoms
    //


.ViewHolderUtility.ViewHolderCreateShop
import org.nearbyshops.whitelabelapp.ViewHolders.ViewHolderUtility.ViewHolderCreateShop.CreateShopData
import org.nearbyshops.whitelabelapp.ViewHolders.ViewHolderUtility.ViewHolderShopSuggestions
import org.nearbyshops.whitelabelapp.ViewHolders.ViewHolderUtility.ViewHolderShopSuggestions.ShopSuggestionsData
import org.nearbyshops.whitelabelapp.ViewHolders.ViewHoldersCommon.*
import org.nearbyshops.whitelabelapp.aaListUI.Model.ViewType
import java.util.*

/**
 * Created by sumeet on 25/5/16.
 */
class AdapterKotlin(private var dataset: List<Any>,
                    private val context: Context,
                    private val fragment: Fragment
):RecyclerView.Adapter<RecyclerView.ViewHolder>() {

    companion object {

        // utility view types
        const val VIEW_TYPE_FULL_SCREEN_PROGRESS_INDICATOR = 1
        const val VIEW_TYPE_BUTTON_ADD_NEW_ADDRESS = 2
        const val VIEW_TYPE_BUTTON_WITH_MARGIN = 1003

        const val VIEW_TYPE_BANNER_IMAGE = 1004
        const val VIEW_TYPE_HIGHLIGHTS = 3
        const val VIEW_TYPE_HEADER = 4
        const val VIEW_TYPE_SCROLL_PROGRESS_BAR = 5
        const val VIEW_TYPE_EMPTY_SCREEN = 6
        const val VIEW_TYPE_EMPTY_SCREEN_LIST_ITEM = 7
        const val VIEW_TYPE_LIST_ITEM_FULL_GRAPHIC = 8
        const val VIEW_TYPE_SET_LOCATION_MANUALLY = 9
        const val VIEW_TYPE_CREATE_MARKET = 11

        // main view types
        const val view_type_nearby_markets_list = 12
        const val VIEW_TYPE_ITEM_CATEGORY_LIST = 13
        const val VIEW_TYPE_DELIVERY_ADDRESS = 14

        // order view types
        const val VIEW_TYPE_ORDER_TRACKER = 15
        const val VIEW_TYPE_ORDER_ADDRESS = 16
        const val VIEW_TYPE_ORDER_ITEM = 18
        const val VIEW_TYPE_ORDER_BILL = 19

        const val VIEW_TYPE_SHOP = 20

        const val VIEW_TYPE_SHOP_ITEM = 21
        const val VIEW_TYPE_ITEM_CATEGORY = 22

        // admin view types

        const val VIEW_TYPE_SHOP_PROFILE = 23
        const val VIEW_TYPE_SHOP_ANALYTICS = 24

        // market admin view types

        const val VIEW_TYPE_MARKET_PROFILE = 25
        const val VIEW_TYPE_MARKET_ANALYTICS = 26

    }

    private var loadMore = false

    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {

        if(viewType== VIEW_TYPE_DELIVERY_ADDRESS)
        {
            return ViewHolderDeliveryAddress.create(parent,context,fragment)
        }
        else if (viewType == VIEW_TYPE_HIGHLIGHTS) {

            return ViewHolderHighlightList.create(parent, context, fragment)

        }
        else if (viewType == VIEW_TYPE_ITEM_CATEGORY_LIST) {

            return ViewHolderHorizontalList.create(parent, context, fragment)

        }
        else if (viewType == VIEW_TYPE_LIST_ITEM_FULL_GRAPHIC) {

            return ViewHolderListItemFullGraphic.create(parent, context, fragment,this)
        }
        else if (viewType == VIEW_TYPE_HEADER) {

            return ViewHolderHeader.create(parent, context,ViewHolderHeader.LAYOUT_TYPE_SIMPLE)

        }
        else if (viewType == VIEW_TYPE_SCROLL_PROGRESS_BAR) {

            return LoadingViewHolder.create(parent, context)

        }
        else if (viewType == VIEW_TYPE_EMPTY_SCREEN) {

            return ViewHolderEmptyScreenFullScreen.create(parent, context, fragment


 de mensen beschermen. Voorwaar, Allah leidt het ongelovige volk niet."
  },
  {
    "surah_number": 5,
    "verse_number": 68,
    "content":
        "Zeg (O Moehammad): \"O Lieden van de Schrift! Jullie zijn niet (op de juiste weg) dat jullie je niet vasthouden aan de TaurAt en de Indjil en aan wat jullie door jullie Heer neergezonden is.\" (De Koran) die door jouw Heer aan jou is neergezonden, vermeerdert zeker bij velen van hen overtreding en ongeloof. En treur niet om het ongelovige."
  },
  {
    "surah_number": 5,
    "verse_number": 69,
    "content":
        "Voorwaar, degenen die (in de Koran) geloven en de Joden en de Sabiërs en de Christenen en wie er in Allah en de Laatste Dag geloven en goede werk verrichten: voor hen zal er geen angst zijn en zij zullen niet treuren."
  },
  {
    "surah_number": 5,
    "verse_number": 70,
    "content":
        "En Wij sloten een verbond met de Kinderen van Israel en Wij zonden hen Boodschappers. Iedere keer dat er een Boodschapper tot hen kwam, met wat niet met hun eigen wens overeenkwam, loochenden zij sominigen en doodden zij sommigen."
  },
  {
    "surah_number": 5,
    "verse_number": 71,
    "content":
        "En zij dackten dat er geen beproeving zou zijn, zij werden daarop blind en doof. Vervolgens aanvaardde Allah hun berouw, maar velen van hen werden (weer) blind en doof. En Allah zict wat zij doen."
  },
  {
    "surah_number": 5,
    "verse_number": 72,
    "content":
        "Voorzeker, zij zijn ongelovig die zeggen: \"Allah is de Masîh, zoon van Maryam.\" Hoewel de Masîh zei: \"O Kinderen van Israël, aanbidt Allah, mijn Heer on jullie Heer.\" Voorwaar, hij die deelgenoten aan Allah toekent: Allah heeft hem waarlijk het Paradijs verboden. En zijn bestemming zal de Hel zijn. En voor de onrechtvaardigen zijn er geen helpers."
  },
  {
    "surah_number": 5,
    "verse_number": 73,
    "content":
        "Voorzeker zij zijn ongelovig die zeggen: \"Allah is één derde van drie (goden).'\" Want er is geen god dan Allah, de Ene. En indien zij niet ophouden met wat zij zeggen: dan treft zeker een pijnlijke bestraffing degenen van hen die ongelovig zijn."
  },
  {
    "surah_number": 5,
    "verse_number": 74,
    "content":
        "Waarom tonen zij geen berouw aan Allah en vragen zij Hem niet am vergeving? En Allah is Vergevensgezind, Meest Barmhartig."
  },
  {
    "surah_number": 5,
    "verse_number": 75,
    "content":
        "De Masîh, zoon van Maryam, is niet anders dan een Boodschapper, hij werd waarlijk voorafgegaan door Boodschappers en zijn moeder was een oprechte vrouw. Zij plachten beiden voedsel te eten (net als andere mensen), Zie hoe Wij voor hen de Tekenen duidelijk maakten en zie dan hoe zij (de ongelovigen) zich afwendden."
  },
  {
    "surah_numbe


label: 'John'
    },
    {
      data: 13000,
      color: '#76C1FA',
      label: 'Margaret'
    },
    {
      data: 15000,
      color: '#63CF72',
      label: 'Richard'
    }
  ];

  if ($("#pie-chart").length) {
    $.plot("#pie-chart", data, {
      series: {
        pie: {
          show: true,
          radius: 1,
          label: {
            show: true,
            radius: 3 / 4,
            formatter: labelFormatter,
            background: {
              opacity: 0.5
            }
          }
        }
      },
      legend: {
        show: false
      }
    });
  }

  function labelFormatter(label, series) {
    return "
" + label + "
" + Math.round(series.percent) + "%
";
  }

  /*---------------------
   ----- LINE CHART -----
   ---------------------*/

  var d1 = [
    [0, 30],
    [1, 35],
    [2, 35],
    [3, 30],
    [4, 30]
  ];
  var d2 = [
    [0, 50],
    [1, 40],
    [2, 45],
    [3, 60],
    [4, 50]
  ];
  var d3 = [
    [0, 40],
    [1, 50],
    [2, 35],
    [3, 25],
    [4, 40]
  ];

  var stackedData = [{
      data: d1,
      color: "#76C1FA"
    },
    {
      data: d2,
      color: "#63CF72"
    },
    {
      data: d3,
      color: "#F36368"
    }
  ];
  /*---------------------------------------------------
      Make some random data for Recent Items chart
  ---------------------------------------------------*/

  var options = {
    series: {
      shadowSize: 0,
      lines: {
        show: true,
      },
    },
    grid: {
      borderWidth: 1,
      labelMargin: 10,
      mouseActiveRadius: 6,
      borderColor: '#eee',
      show: true,
      hoverable: true,
      clickable: true

    },
    xaxis: {
      tickColor: '#eee',
      tickDecimals: 0,
      font: {
        lineHeight: 15,
        style: "normal",
        color: "#000"
      },
      shadowSize: 0,
      ticks: [
        [0, "Jan"],
        [1, "Feb"],
        [2, "Mar"],
        [3, "Apr"],
        [4, "May"],
        [5, "Jun"],
        [6, "Jul"],
        [7, "Aug"],
        [8, "Sep"],
        [9, "Oct"],
        [10, "Nov"],
        [11, "Dec"]
      ]
    },

    yaxis: {
      tickColor: '#eee',
      tickDecimals: 0,
      font: {
        lineHeight: 15,
        style: "normal",
        color: "#000",
      },
      shadowSize: 0
    },

    legend: {
      container: '.flc-line',
      backgroundOpacity: 0.5,
      noColumns: 0,
      backgroundColor: "white",
      lineWidth: 0
    },
    colors: ["#F36368", "#63CF72", "#68B3C8"]
  };

  if ($("#line-chart").length) {
    $.plot($("#line-chart"), [{
        data: d1,
        lines: {
          show: true
        },
        label: 'Product A',
        stack: true,
        color: '#F36368'
      },
      {
        data: d2,
        lines: {
          show: true
        },
        label: 'Product B',
        stack: true,
        color: '#FABA66'
      },
      {
        dat


/*
**
**  OO_Copyright_BEGIN
**
**
**  Copyright 2010, 2021 IBM Corp. All rights reserved.
**
**  Redistribution and use in source and binary forms, with or without
**   modification, are permitted provided that the following conditions
**  are met:
**  1. Redistributions of source code must retain the above copyright
**     notice, this list of conditions and the following disclaimer.
**  2. Redistributions in binary form must reproduce the above copyright
**     notice, this list of conditions and the following disclaimer in the
**  documentation and/or other materials provided with the distribution.
**  3. Neither the name of the copyright holder nor the names of its
**     contributors may be used to endorse or promote products derived from
**     this software without specific prior written permission.
**
**  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
**  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
**  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
**  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
**  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
**  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
**  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
**  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
**  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
**  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
**  POSSIBILITY OF SUCH DAMAGE.
**
**
**  OO_Copyright_END
**
*************************************************************************************
**
** COMPONENT NAME:  IBM Linear Tape File System
**
** FILE NAME:       arch/arch_info.c
**
** DESCRIPTION:     Show platform information
**
** AUTHOR:          Atsushi Abe
**                  IBM Yamato, Japan
**                  PISTE@jp.ibm.com
**
*************************************************************************************
*/

#include "libltfs/ltfs.h"
#ifdef HAVE_SYS_SYSCTL_H
#include <sys/sysctl.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>

void show_runtime_system_info(void)
#if defined(__linux__)
{
	int fd;
	char kernel_version[512];
	char destribution[256];
	DIR *dir;
	struct dirent *dent;
	struct stat stat_vm64, stat_rel;
	char *path, *tmp;

	fd = open("/proc/version", O_RDONLY);
	if( fd == -1) {
		ltfsmsg(LTFS_WARN, 17086W);
	} else {
		memset(kernel_version, 0, sizeof(kernel_version));
		read(fd, kernel_version, sizeof(kernel_version));
		if((tmp = strchr(kernel_version, '\n')) != NULL)
			*tmp = '\0';

		if(stat("/proc/sys/kernel/vsyscall64", &stat_vm64) != -1 && S_ISREG(stat_vm64.st_mode)) {
#if defined(__i386__) || defined(__x86_64__)
			strcat(kernel_version, " x86_64");
#elif defined(__ppc__) || defined(__ppc64__)
			strcat(kernel_version, " ppc64");
#else
			strcat(kernel_version, " unknown");
#endif
		}
		else {
#if defined(__i386__) || defined(__x86_64__)
			strcat(kernel_version, " i386");
#elif defined(__ppc__) || defined(__ppc64__)
			strcat(kernel_version, " ppc");
#else
			strcat(kernel_version, " unknown");
#endif
		}
		ltfsmsg(LTFS_INFO, 17087I, kernel_version);
		close(fd);
	}

	dir = opendir("/etc");
	if (dir) {
		while( (dent = readdir(dir)) != NULL) {
			if(strlen(dent->d_name) > strlen("-release") &&
			   !strcmp(&(dent->d_name[strlen(dent->d_name) - strlen("-release")]), "-release")) {
				path = calloc(1, strlen(dent->d_name) + strlen("/etc/") + 1);
				if (!path) {
					/* Memory allocation failed */
					ltfsmsg(LTFS_ERR, 10001E, __FUNCTION__);
					closedir(dir);
					return;
				}
				strcat(path, "/etc/");
				strcat(path, dent->d_name);
				fd = open(path, O_RDONLY);
				if( fd == -1) {
					ltfsmsg(LTFS_WARN, 17088W);
				} else {
					if (fstat(fd, &stat_rel) != -1 && S_ISREG(stat_rel.st_mode)) {
						memset(destribution, 0, sizeof(destribution));
						read(fd, destribution, sizeof(destribution));
						if((tmp = strchr(destribution, '\n')) != NULL)
							*tmp = '\0';
						ltfsmsg(LTFS_INFO, 17089I, destribution);
					}

					close(fd);
				}
				free(path);
			}
		}
		closedir(dir);
	}

	return;
}
#elif defined(HAVE_SYS_SYSCTL_H)
{
	int mib[2];
	size_t len;
	char *kernel_version;

	mib[0] = CTL_KERN;
	mib[1] = KERN_VERSION;

	if (sysctl(mib, 2, NULL, &len, NULL, 0) == -1) {
		ltfsmsg(LTFS_WARN, 17090W, "


xPathList";
    private static final String FIELD_PATH_LIST = "pathList";
    private static final String FIELD_DEX_ELEMENTS = "dexElements";

       private static void loadPluginClass(Context context, ClassLoader hostClassLoader) throws Exception {
        // Step1. 获取到插件apk，通常都是从网络上下载，这里为了演示，直接将插件apk push到手机
        File pluginFile = context.getExternalFilesDir("plugin");
        Log.i(TAG, "pluginPath:" + pluginFile.getAbsolutePath());
        if (pluginFile == null || !pluginFile.exists() || pluginFile.listFiles().length == 0) {
            Toast.makeText(context, "插件文件不存在", Toast.LENGTH_SHORT).show();
            return;
        }
        pluginFile = pluginFile.listFiles()[0];
        // Step2. 创建插件的DexClassLoader
        DexClassLoader pluginClassLoader = new DexClassLoader(pluginFile.getAbsolutePath(), null, null, hostClassLoader);
        // Step3. 通过反射获取到pluginClassLoader中的pathList字段
        Object pluginDexPathList = ReflectUtil.getField(BaseDexClassLoader.class, pluginClassLoader, FIELD_PATH_LIST);
        // Step4. 通过反射获取到DexPathList的dexElements字段
        Object pluginElements = ReflectUtil.getField(Class.forName(CLASS_DEX_PATH_LIST), pluginDexPathList, FIELD_DEX_ELEMENTS);

        // Step5. 通过反射获取到宿主工程中ClassLoader的pathList字段
        Object hostDexPathList = ReflectUtil.getField(BaseDexClassLoader.class, hostClassLoader, FIELD_PATH_LIST);
        // Step6. 通过反射获取到宿主工程中DexPathList的dexElements字段
        Object hostElements = ReflectUtil.getField(Class.forName(CLASS_DEX_PATH_LIST), hostDexPathList, FIELD_DEX_ELEMENTS);

        // Step7. 将插件ClassLoader中的dexElements合并到宿主ClassLoader的dexElements
        Object array = combineArray(hostElements, pluginElements);

        // Step8. 将合并的dexElements设置到宿主ClassLoader
        ReflectUtil.setField(Class.forName(CLASS_DEX_PATH_LIST), hostDexPathList, FIELD_DEX_ELEMENTS, array);
    }
}
```

#### 处理插件Activity的启动

> 在Android中，Activity的启动需要在`AndroidManifest.xml`中配置，如果没有配置的话，就会报`ActivityNotFoundException`异常，而插件的Activity无法再宿主AndroidManifest中注册。在上面的Activity的启动流程图，Activity的启动是要经过AMS的校验的，所以就需要对AMS下功夫。

Step1. 在宿主工程的AndroidManifest.xml中预先注册Activity进行占坑。

```
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns


local beautiful = require("beautiful")
local awful = require("awful")
-- Client Signals
-- =======================================================

-- Focus handling
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)

-- Enable sloppy focus, so that focus follows mouse.
client.connect_signal("mouse::enter", function(c)
    c:emit_signal("request::activate", "mouse_enter", {raise = false})
end)

-- allow focus stealing
-- TODO: figure out how to get this work for realsises
awful.ewmh.add_activate_filter(function(c


Box::new(move |j| j * i)
}

/// # 闭包: 作为返回值（动态分发）Rust 2018
///
/// Basic usage:
///
/// ```
/// fn two_times_dyn() -> Box<dyn Fn(i32) -> i32> {
///     let i = 2;
///     Box::new(move |j| j * i)
/// }
/// let result = two_times_dyn();
/// assert_eq!(result(2), 4);
/// ```
pub fn two_times_dyn() -> Box<dyn Fn(i32) -> i32> {
    let i = 2;
    Box::new(move |j| j * i)
}

/// # 闭包: 作为返回值（静态分发）
///
/// Basic usage:
///
/// ```
/// fn two_times_impl() -> impl Fn(i32) -> i32{
///     let i = 2;
///     move |j| j * i
/// }
/// let result = two_times_impl();
/// assert_eq!(result(2), 4);
/// ```
pub fn two_times_impl() -> impl Fn(i32) -> i32 {
    let i = 2;
    move |j| j * i
}
//! Runs build tasks, potentially in parallel.
//! Unaware of the build graph, pools, etc.; just command execution.
//!
//! TODO: consider rewriting to use poll() etc. instead of threads.
//! The threads might be relatively cheap(?) because they just block on
//! the subprocesses though?

use crate::depfile;
use crate::graph::BuildId;
use crate::scanner::Scanner;
use anyhow::{anyhow, bail};
use std::io::Write;
use std::os::unix::process::ExitStatusExt;
use std::sync::mpsc;
use std::time::{Duration, Instant};

pub struct FinishedTask {
    /// A (faked) "thread id", used to put different finished builds in different
    /// tracks in a performance trace.
    pub tid: usize,
    pub buildid: BuildId,
    pub span: (Instant, Instant),
    pub result: TaskResult,
}

/// The result of executing a build step.
pub struct TaskResult {
    pub success: bool,
    /// Console output.
    pub output: Vec<u8>,
    pub discovered_deps: Option<Vec<String>>,
}

/// Reads dependencies from a .d file path.
fn read_depfile(path: &str) -> anyhow::Result<Vec<String>> {
    let mut bytes = match std::fs::read(path) {
        Ok(b) => b,
        Err(e) => bail!("read {}: {}", path, e),
    };
    let mut scanner = Scanner::new(&mut bytes);
    let parsed_deps = depfile::parse(&mut scanner)
        .map_err(|err| anyhow!(scanner.format_parse_error(path, err)))?;
    // TODO verify deps refers to correct output
    let deps: Vec<String> = parsed_deps
        .deps
        .iter()
        .map(|&dep| dep.to_string())
        .collect();
    Ok(deps)
}

/// Executes a build task as a subprocess.
/// Returns an Err() if we failed outside of the process itself.
fn run_task(cmdline: &str, depfile: Option<&str>) -> anyhow::Result<TaskResult> {
    let mut cmd = std::process::Command::new("/bin/sh")
        .arg("-c")
        .arg(cmdline)
        .output()?;
    let mut output = Vec::new();
    output.append(&mut cmd.stdout);
    output.append(&mut cmd.stderr);
    let success = cmd.status.success();

    let mut discovered_deps: Option<Vec<String>> = None;
    if success {
        discovered_deps = match depfile {
            None => None,
            Some(deps) => Some(read_depfile(deps)?),
        };
    } else {
        // Command failed.
        if let Some(sig) = cmd.status.signal() {
            match sig {
                libc::SIGINT => write!(output, "interrupted").unwrap(),
                _ => write!(output, "signal {}", sig).unwrap(),


# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.

from lxml import html
import requests
from urllib3.exceptions import LocationParseError

def get_link_preview_from_url(url, request_session=None):
    """
    Get the Open Graph properties of an url. (https://ogp.me/)
    If the url leads directly to an image mimetype, return
    the url as preview image else retrieve the properties from
    the html page.

    Using a stream request to prevent loading the whole page
    as those properties are declared in the <head> tag.

    The request session is optional as in some cases using
    a session could be beneficial performance wise
    (e.g. a lot of url could have the same domain).
    """
    # Some websites are blocking non browser user agent.
    user_agent = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0'}
    try:
        if request_session:
            response = request_session.get(url, timeout=3, headers=user_agent, allow_redirects=True, stream=True)
        else:
            response = requests.get(url, timeout=3, headers=user_agent, allow_redirects=True, stream=True)
    except requests.exceptions.RequestException:
        return False
    except LocationParseError:
        return False
    if not response.ok or not response.headers.get('Content-Type'):
        return False
    # Content-Type header can return a charset, but we just need the
    # mimetype (eg: image/jpeg;charset=ISO-8859-1)
    content_type = response.headers['Content-Type'].split(';')
    if response.headers['Content-Type'].startswith('image/'):
        return {
            'image_mimetype': content_type[0],
            'og_image': url, # If the url mimetype is already an image type, set url as preview image
            'source_url': url,
        }
    elif response.headers['Content-Type'].startswith('text/html'):
        return get_link_preview_from_html(url, response)
    return False

def get_link_preview_from_html(url, response):
    """
    Retrieve the Open Graph properties from the html page. (https://ogp.me/)
    Load the page with chunks of 8kb to prevent loading the whole
    html when we only need the <head> tag content.
    Fallback on the <title> tag if the html doesn't have
    any Open Graph title property.
    """
    content = b""
    for chunk in response.iter_content(chunk_size=8192):
        content += chunk
        pos = content.find(b'</head>', -8196 * 2)
        # Stop reading once all the <head> data is found
        if pos != -1:
            content = content[:pos + 7]
            break

    if not content:
        return False
    tree = html.fromstring(content)
    og_title = tree.xpath('//meta[@property="og:title"]/@content')
    if og_title:
        og_title = og_title[0]
    elif tree.find('.//title') is not None:
        # Fallback on the <title> tag if it exists
        og_title = tree.find('.//title').text
    else:
        return False
    og_description = tree.xpath('//meta[@property="og:description"]/@content')
    og_type = tree.xpath('//meta[@property="og:type"]/@content')
    og_site_name = tree.xpath('//meta[@property="og:site_name"]/@content')
    og_image = tree.xpath('//meta[@property="og:image"]/@content')
    og_mimetype = tree.xpath('//meta[@property="og:image:type"]/@content')
    return {
        'og_description': og_description[0] if og_description else None,
        'og_image': og_image[0] if og_image else None,
        'og_mimetype': og_mimetype[0] if og_mimetype else None,
        'og_title': og_title,
        'og_type': og_type[0] if og_type else None,
        'og_site_name': og_site_name[0] if og_site_name else None,
        'source_url': url,
    }


jqwik.api.arbitraries.BigIntegerArbitrary;
import net.jqwik.api.arbitraries.ByteArbitrary;
import net.jqwik.api.arbitraries.CharacterArbitrary;
import net.jqwik.api.arbitraries.DoubleArbitrary;
import net.jqwik.api.arbitraries.FloatArbitrary;
import net.jqwik.api.arbitraries.IntegerArbitrary;
import net.jqwik.api.arbitraries.LongArbitrary;
import net.jqwik.api.arbitraries.ShortArbitrary;
import net.jqwik.api.arbitraries.StringArbitrary;

import com.navercorp.fixturemonkey.api.arbitrary.MonkeyStringArbitrary;

@API(since = "0.4.0", status = Status.MAINTAINED)
public interface JavaTypeArbitraryGenerator {

	default StringArbitrary strings() {
		return monkeyStrings();
	}

	/**
	 * Generate a MonkeyStringArbitrary object filtered so that it doesn't contain a ISOControl character
	 *
	 * @return the filtered MonkeyStringArbitrary object
	 */
	default MonkeyStringArbitrary monkeyStrings() {
		return new MonkeyStringArbitrary().filterCharacter(c -> !Character.isISOControl(c));
	}

	default CharacterArbitrary characters() {
		return Arbitraries.chars();
	}

	default ShortArbitrary shorts() {
		return Arbitraries.shorts();
	}

	default ByteArbitrary bytes() {
		return Arbitraries.bytes();
	}

	default DoubleArbitrary doubles() {
		return Arbitraries.doubles();
	}

	default FloatArbitrary floats() {
		return Arbitraries.floats();
	}

	default IntegerArbitrary integers() {
		return Arbitraries.integers();
	}

	default LongArbitrary longs() {
		return Arbitraries.longs();
	}

	default BigIntegerArbitrary bigIntegers() {
		return Arbitraries.bigIntegers();
	}

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

package com.navercorp.fixturemonkey.api.jqwik;

import java.math.BigDecimal;
import java.math.BigInteger;

import org.apiguardian.api.API;
import org.apiguardian.api.API.Status;

import com.navercorp.fixturemonkey.api.arbitrary.CombinableArbitrary;
import com.navercorp.fixturemonkey.api.arbitrary.JavaTypeArbitraryGeneratorSet;
import com.navercorp.fixturemonkey.api.generator.ArbitraryGeneratorContext;

/**
 * It would be moved into jqwik module in 0.7.0.
 */
@API(since = "0.6.3", status = Status.MAINTAINED)
public final class JqwikJavaTypeArbitraryGeneratorSet implements JavaTypeArbitraryGeneratorSet {
	private final JavaTypeArbitraryGenerator arbitraryGenerator;
	private final JavaArbitraryResolver arbitraryResolver;

	public JqwikJavaTypeArbitraryGeneratorSet(
		JavaTypeArbitraryGenerator arbitraryGenerator,
		JavaArbitraryResolver arbitraryResolver
	) {
		this.arbitraryGenerator = arbitraryGenerator;
		this.arbitrary


w defaults to False. (It was effectively False prior to 20190918.)

20190918: The zhop option in [safe_z_homing] is always re-applied after Z axis homing completed. This might need users to update custom scripts based on this module.

20190806: The SET_NEOPIXEL command has been renamed to SET_LED.

20190726: The mcp4728 digital-to-analog code has changed. The default i2c_address is now 0x60 and the voltage reference is now relative to the mcp4728's internal 2.048 volt reference.

20190710: The z_hop option was removed from the [firmware_retract] config section. The z_hop support was incomplete and could cause incorrect behavior with several common slicers.

20190710: The optional parameters of the PROBE_ACCURACY command have changed. It may be necessary to update any macros or scripts that use that command.

20190628: All configuration options have been removed from the [skew_correction] section. Configuration for skew_correction is now done via the SET_SKEW gcode. See [Skew Correction](Skew_Correction.md) for recommended usage.

20190607: The "variable_X" parameters of gcode_macro (along with the VALUE parameter of SET_GCODE_VARIABLE) are now parsed as Python literals. If a value needs to be assigned a string then wrap the value in quotes so that it is evaluated as a string.

20190606: The "samples", "samples_result", and "sample_retract_dist" config options have been moved to the "probe" config section. These options are no longer supported in the "delta_calibrate", "bed_tilt", "bed_mesh", "screws_tilt_adjust", "z_tilt", or "quad_gantry_level" config sections.

20190528: The magic "status" variable in gcode_macro template evaluation has been renamed to "printer".

20190520: The SET_GCODE_OFFSET command has changed; update any g-code macros accordingly. The command will no longer apply the requested offset to the next G1 command. The old behavior may be approximated by using the new "MOVE=1" parameter.

20190404: The Python host software packages were updated. Users will need to rerun the ~/klipper/scripts/install-octopi.sh script (or otherwise upgrade the python dependencies if not using a standard OctoPi installation).

20190404: The i2c_bus and spi_bus parameters (in various config sections) now take a bus name instead of a number.

20190404: The sx1509 config parameters have changed. The 'address' parameter is now 'i2c_address' and it must be specified as a decimal number. Where 0x3E was previously used, specify 62.

20190328: The min_speed value in [temperature_fan] config will now be respected and the fan will always run at this speed or higher in PID mode.

20190322: The default value for "driver_HEND" in [tmc2660] config sections was changed from 6 to 3. The "driver_VSENSE" field was removed (it is now automatically calculated from run_current).

20190310: The [controller_fan] config section now always takes a name (such as [controller_fan my_controller_fan]).

20190308: The "driver_BLANK_TIME_SELECT" field in [tmc2130] and [tmc2208] config sections has been renamed to "driver_TBL".

20190308: The [tmc2660] config section has changed. A new sense_resistor config parameter must now be provided. The meaning of several of the driver_XXX parameters has changed.

20190228: Users of SPI or I2C on SAMD21 boards must now specify the bus pins via a [samd_sercom] config section.

20190224: The bed_shape option has been removed from bed_mesh. The radius option has been renamed to bed_radius. Users with round beds should supply the bed_radius and round_probe_count options.

20190107: The i2c_address parameter in the mcp4451 config section changed. This is a common setting on Smoothieboards. The new value is half the old value (88 should be changed to 44, and 90 should be changed to 45).

20181220: Klipper v0.7


# Copyright (C) 2010-2011 Richard Lincoln
#
# 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.

"""The production package is responsible for classes which describe various kinds of generators. These classes also provide production costing information which is used to economically allocate demand among committed units and calculate reserve quantities.
"""

from CIM14.ENTSOE.Equipment.Generation.Production.WindGeneratingUnit import WindGeneratingUnit
from CIM14.ENTSOE.Equipment.Generation.Production.GeneratingUnit import GeneratingUnit
from CIM14.ENTSOE.Equipment.Generation.Production.FossilFuel import FossilFuel
from CIM14.ENTSOE.Equipment.Generation.Production.NuclearGeneratingUnit import NuclearGeneratingUnit
from CIM14.ENTSOE.Equipment.Generation.Production.HydroGeneratingUnit import HydroGeneratingUnit
from CIM14.ENTSOE.Equipment.Generation.Production.ThermalGeneratingUnit import ThermalGeneratingUnit
from CIM14.ENTSOE.Equipment.Generation.Production.HydroPump import HydroPump

nsURI = "http://iec.ch/TC57/2009/CIM-schema-cim14?profile=http://iec.ch/TC57/2007/profile#Production"
nsPrefix = "cimProduction"

class FuelType(str):
    """Values are: oil, coal, lignite, gas
    """
    pass

class GeneratorControlSource(str):
    """Values are: onAGC, unavailable, plantControl, offAGC
    """
    pass


.hasMaterial = borderMaterial !== '' ? true : false;
        this.borderSize = borderSize;
        this.title = title;
        this.iterateTime = iterateTime;
        this.isLocked = isLocked;
        this.toBeDisplayed = toBeDisplayed;
    }

    getBorderStyle() {
        let style = {
            'background-size': 'cover',
            'background-color': '#ffffff',
            'width': '1980px',
            'height': '520px'
        };

        if (this.borderMaterial !== '' && this.borderMaterial !== undefined) {
            style['background-image'] = 'url(' + this.borderMaterial + ')';
        }

        return style;
    }

    getWallStyle() {
        let style = {
            'width':  (1980 - (this.hasMaterial ? this.borderSize : 0)) + 'px',
            'height': (520 - (this.hasMaterial ? this.borderSize : 0)) + 'px',
            'top':  ((this.hasMaterial ? this.borderSize : 0) / 2) + 'px',
            'left': ((this.hasMaterial ? this.borderSize : 0) / 2) + 'px',
            'background-color': '#C4C4C4',
            'position': 'relative',
            'background-size': 'cover'
        };

        var wallWallpaper = this.images[this.displayedImageIndex];
        if (wallWallpaper !== '' && wallWallpaper !== undefined) {
            style['background-image'] = 'url(' + wallWallpaper + ')';
        }

        return style;
    }

    copy() {
        var newWall = new Wall();
        newWall.borderMaterial = this.borderMaterial;
        newWall.hasMaterial = this.hasMaterial;
        newWall.borderSize = this.borderSize;
        newWall.displayedImageIndex = this.displayedImageIndex;
        newWall.title = this.title;
        newWall._id = this._id;
        newWall.iterateTime = this.iterateTime;
        newWall.isLocked = this.isLocked;
        newWall.toBeDisplayed = this.toBeDisplayed;

        newWall.images = [];
        for (var i = 0; i < this.images.length; i++) {
            newWall.images.push(this.images[i]);
        }

        newWall.frames = [];
        for (i = 0; i < this.frames.length; i++) {
            newWall.frames.push(this.frames[i].copy());
        }

        return newWall;
    }
}
module core.gpu {
	export enum SyncType {
		ListDone = 0,
		ListQueued = 1,
		ListDrawingDone = 2,
		ListStallReached = 3,
		ListCancelDone = 4,
	}

	export class GpuFrameBufferState {
		lowAddress = 0;
		highAddress = 0;
		width = 0;
	}

	export enum IndexEnum {
		Void = 0,
		Byte = 1,
		Short = 2,
	}

	export enum NumericEnum {
		Void = 0,
		Byte = 1,
		Short = 2,
		Float = 3,
	}

	export enum ColorEnum {
		Void = 0,
		Invalid1 = 1,
		Invalid2 = 2,
		Invalid3 = 3,
		Color5650 = 4,
		Color5551 = 5,
		Color4444 = 6,
		Color8888 = 7,
	}

	export class Vertex {
		px = 0.0; py = 0.0; pz = 0.0;
		nx = 0.0; ny = 0.0; nz = 0.0;
		tx = 0.0; ty = 0.0; tz = 0.0;
		r = 0.0; g = 0.0; b = 0.0; a = 1.0;
		w0 = 0.0; w1 = 0.0; w2 = 0.0; w3 = 0.0;
		w4 = 0.0; w5 = 0.0; w6 = 0.0; w7 = 0.0;


		joinType = (SqlJoinType) builder.EvaluateExpression(methodCall.Arguments[1])! switch
					{
						SqlJoinType.Inner => JoinType.Inner,
						SqlJoinType.Left  => JoinType.Left,
						SqlJoinType.Right => JoinType.Right,
						SqlJoinType.Full  => JoinType.Full,
						_                 => throw new InvalidOperationException($"Unexpected join type: {(SqlJoinType)builder.EvaluateExpression(methodCall.Arguments[1])!}")
					};
					break;
			}

			buildInfo.JoinType = joinType;

			sequence = new SubQueryContext(sequence);
			var result = sequence;

			if (methodCall.Arguments[conditionIndex] != null)
			{
				var condition = (LambdaExpression)methodCall.Arguments[conditionIndex].Unwrap();

				result = builder.BuildWhere(result, condition: condition, enforceHaving: false, out var error);

				if (result == null)
					return BuildSequenceResult.Error(error ?? methodCall);

				/*if (joinType == JoinType.Full)
				{
					result.SelectQuery.Where.SearchCondition =
						QueryHelper.CorrectComparisonForJoin(result.SelectQuery.Where.SearchCondition);
				}*/

				result.SetAlias(condition.Parameters[0].Name);
			}

			if (joinType is JoinType.Left or JoinType.Full)
			{
				result = new DefaultIfEmptyBuilder.DefaultIfEmptyContext(buildInfo.Parent,
					sequence: result,
					nullabilitySequence: result,
					defaultValue: null,
					isNullValidationDisabled: false);
			}

			return BuildSequenceResult.FromContext(result);
		}
	}
}


rs[ii_b], s=marker_size)
                        self.ax.scatter(x_bar, geo_cfft_em,
                                        color=colors[ii_b], marker=markers[ii_a], edgecolors="black", s=marker_size)
                    else:
                        pass
        # configuration
        self.ax.set_xscale("log")
        self.ax.set_yscale("log")
        self.ax.grid(which="both")
        self.ax.set_axisbelow(True)
        self.ax.legend()
        if x_input == "area":
            self.ax.set_xlabel(f"Area (mm2)")
        elif x_input == "topsw":
            self.ax.set_xlabel(f"TOP/s/W")
        elif x_input == "carbon":
            self.ax.set_xlabel(f"g, CO2")
        else:
            self.ax.set_xlabel(f"")
        if y_input in ["carbon", "carbon_bd"]:
            self.ax.set_ylabel(f"g, CO2")
        elif y_input in ["topsw"]:
            self.ax.set_ylabel(f"TOP/s/W")
        elif y_input == "area":
            self.ax.set_ylabel(f"Area (mm2)")
        else:
            self.ax.set_ylabel("")

        # Update canvas
        self.canvas.draw()

    def exit_gui(self):
        self.root.destroy()

if __name__ == "__main__":
    demo()


+9c94-9c9b, U+9c9e-9ca3, U+9ca5-9ca7, U+9ca9, U+9cab, U+9cad-9cae, U+9cb1-9cb7, U+9cb9-9cbd, U+9cbf-9cc0, U+9cc3, U+9cc5-9cc7, U+9cc9-9cd1, U+9cd3-9cda, U+9cdc-9cdd, U+9cdf, U+9ce1-9ce3, U+9ce5, U+9ce9, U+9cee-9cef, U+9cf3-9cf4, U+9cf6, U+9cfc-9cfd, U+9d02, U+9d08-9d09, U+9d12, U+9d1b, U+9d1e, U+9d26, U+9d28, U+9d37, U+9d3b, U+9d3f, U+9d51, U+9d59, U+9d5c-9d5d, U+9d5f-9d61, U+9d6c, U+9d70, U+9d72, U+9d7a, U+9d7e, U+9d84, U+9d89, U+9d8f, U+9d92, U+9daf, U+9db4, U+9db8, U+9dbc, U+9dc4, U+9dc7, U+9dc9, U+9dd7, U+9ddf, U+9df2, U+9df9;
}
/* [24] */
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 300;
  src: local('Noto Sans SC Light'), local('NotoSansSC-Light'), url(https://fonts.gstatic.com/s/notosanssc/v9/k3kIo84MPvpLmixcA63oeALZhaCt9E3g-Lbpcnr20eUBAZG30RMhmVkJXC-1MKE3QRp5zkww.24.woff2) format('woff2');
  unicode-range: U+9a5f, U+9a62, U+9a65, U+9a69, U+9a6b, U+9a6e, U+9a75, U+9a77-9a7a, U+9a7d, U+9a80, U+9a83, U+9a85, U+9a87-9a8a, U+9a8d-9a8e, U+9a90, U+9a92-9a93, U+9a95-9a96, U+9a98-9a99, U+9a9b-9aa2, U+9aa5, U+9aa7, U+9aaf-9ab1, U+9ab5-9ab6, U+9ab9-9aba, U+9abc, U+9ac0-9ac4, U+9ac8, U+9acb-9acc, U+9ace-9acf, U+9ad1-9ad2, U+9ad9, U+9adf, U+9ae1, U+9ae3, U+9aea-9aeb, U+9aed-9aef, U+9af4, U+9af9, U+9afb, U+9b03-9b04, U+9b06, U+9b08, U+9b0d, U+9b0f-9b10, U+9b13, U+9b18, U+9b1a, U+9b1f, U+9b22-9b23, U+9b25, U+9b27-9b28, U+9b2a, U+9b2f, U+9b31-9b32, U+9b3b, U+9b43, U+9b46-9b49, U+9b4d-9b4e, U+9b51, U+9b56, U+9b58, U+9b5a,


"],
["Long-toed Stint","LC","U"],
["Temminck's Stint","LC","U"],
["Ryukyu Woodcock","VU","U"],
["American Woodcock","LC","U"],
["Andean Snipe","LC","U"],
["Grey-tailed Tattler","LC","U"],
["Wandering Tattler","LC","U"],
["Piping Plover","NT","U"],
["Common Ringed Plover","LC","U"],
["Killdeer","LC","U"],
["Semipalmated Plover","LC","U"],
["Caspian Plover","LC","U"],
["Black-fronted Dotterel","LC","U"],
["Three-banded Plover","LC","U"],
["Senegal Lapwing","LC","U"],
["Long-toed Lapwing","LC","U"],
["Red-wattled Lapwing","LC","U"],
["Variable Oystercatcher","LC","U"],
["South Island Oystercatcher","LC","U"],
["Magellanic Oystercatcher","LC","U"],
["White-headed Stilt","LC","U"],
["Black-necked Stilt","LC","U"],
["White-throated Caracara","LC","U"],
["Carunculated Caracara","LC","U"],
["Striated Caracara","NT","U"],
["Mountain Caracara","LC","U"],
["Yellow-headed Caracara","LC","U"],
["Chimango Caracara","LC","U"],
["Lesser Kestrel","VU","U"],
["Brown-backed Parrotlet","EN","U"],
["Red-fronted Parrot","LC","U"],
["Yellow-tailed Black-cockatoo","LC","U"],
["Carnabys Black-Cockatoo","EN","U"],
["Long-billed Corella","LC","U"],
["African Green Broadbill","VU","U","African Green Broadbill","VU",1.03286,0.0172,0.000535,179,59900000,1740000],
["Tooth-billed Bowerbird","LC","U"],
["White-throated Treecreeper","LC","U"],
["Lattice-tailed Trogon","LC","U"],
["Violaceous Trogon","LC","U"],
["Elegant Trogon","LC","U"],
["Diard's Trogon","NT","U"],
["African Grey Hornbill","LC","U"],
["White-crested Hornbill","LC","U"],
["Malabar Grey Hornbill","LC","U"],
["White-crowned Hornbill","NT","U"],
["Rufous Hornbill","NT","U"],
["Great Hornbill","NT","U"],
["Violet Woodhoopoe","LC","U"],
["Green Woodhoopoe","LC","U"],
["Black-headed Bee-eater","LC","U"],
["Red-throated Bee-eater","LC","U"],
["White-fronted Bee-eater","LC","U"],
["Scaly Ground-roller","VU","U"],
["Rufous-crowned Roller","LC","U"],
["Blue-throated Roller","LC","U"],
["Narrow-billed Tody","LC","U"],
["Puerto Rican Tody","LC","U"],
["Broad-billed Tody","LC","U"],
["Moustached Puffbird","LC","U"],
["Eurasian Wryneck","LC","U"],
["Rufous-necked Wryneck","LC","U"],
["Malaysian Honeyguide","NT","U"],
["Little Owl","LC","U"],
["Spotted Owlet","LC","U"],
["Jungle Owlet","LC","U"],
["Simeulue Scops-owl","NT","U"],
["Mountain Scops-owl","LC","U"],
["Jamaican Owl","LC","U"],
["Striped Owl","LC","U"],
["Abyssinian Owl","LC","U"],
["Madagascar Owl","LC","U"],
["Fearful Owl","VU","U","Fearful Owl","VU",


Instruction_Key_Miss, 0x1800)
	TRAP(6, cr.ifa)
IVT_END(Instruction_Key_Miss)

IVT_ENTRY(Data_Key_Miss, 0x1c00)
	TRAP(7, cr.ifa)
IVT_END(Data_Key_Miss)

IVT_ENTRY(Dirty_Bit, 0x2000)
	mov	r16=cr.ifa
	mov	r17=pr
	;;
	thash	r18=r16
	;;
	ttag	r19=r16
	add	r20=24,r18		// collision chain
	;;
	ld8	r20=[r20]		// first entry
	;;
	rsm	psr.dt			// turn off data translations
	;;
	srlz.d				// serialize
	;;
1:	cmp.eq	p15,p0=r0,r20		// done?
(p15)	br.cond.spnt.few 9f		// bail if done
	;;
	add	r21=16,r20		// tag location
	;;
	ld8	r21=[r21]		// read tag
	;;
	cmp.ne	p15,p0=r21,r19		// compare tags
(p15)	br.cond.sptk.few 2f		// if not, read next in chain
	;;
	ld8	r21=[r20]		// read pte
	mov	r22=PTE_D|PTE_A
	;;
	or	r21=r22,r21		// set dirty & access bit
	;;
	st8	[r20]=r21,8		// store back
	;;
	ld8	r22=[r20]		// read rest of pte
	;;
	dep	r18=0,r18,61,3		// convert vhpt ptr to physical
	;;
	add	r20=16,r18		// address of tag
	;;
	ld8.acq	r23=[r20]		// read old tag
	;;
	dep	r23=-1,r23,63,1		// set ti bit
	;;
	st8.rel	[r20]=r23		// store old tag + ti
	;;
	mf				// make sure everyone sees
	;;
	st8	[r18]=r21,8		// store pte
	;;
	st8	[r18]=r22,8
	;;
	st8.rel	[r18]=r19		// store new tag
	;;
	itc.d	r21			// and place in TLB
	;;
	mov	pr=r17,0x1ffff		// restore predicates
	rfi

2:	add	r20=24,r20		// next in chain
	;;
	ld8	r20=[r20]		// read chain
	br.cond.sptk.few 1b		// loop

9:	mov	pr=r17,0x1ffff		// restore predicates
	TRAP(8, cr.ifa)			// die horribly
IVT_END(Dirty_Bit)

IVT_ENTRY(Instruction_Access_Bit, 0x2400)
	mov	r16=cr.ifa
	mov	r17=pr
	;;
	thash	r18=r16
	;;
	ttag	r19=r16
	add	r20=24,r18		// collision chain
	;;
	ld8	r20=[r20]		// first entry
	;;
	rsm	psr.dt			// turn off data translations
	;;
	srlz.d				// serialize
	;;
1:	cmp.eq	p15,p0=r0,r20		// done?
(p15)	br.cond.spnt.few 9f		// bail if done
	;;
	add	r21=16,r20		// tag location
	;;
	ld8	r21=[r21]


	fmt.Println("## slice contents")
	slicetest.Print(before)
	fmt.Println("## row count per shard")
	for shard, count := range rowsPerShard {
		fmt.Printf("shard:%d count:%d\n", shard, count)
	}

	after := bigslice.Reshuffle(slice)
	after = countRowsPerShard(numShards, after)
	fmt.Println("# after")
	// We set all our keys to 0. After reshuffling, all rows will be in the same
	// shard.
	fmt.Println("## slice contents")
	slicetest.Print(after)
	fmt.Println("## row count per shard")
	for shard, count := range rowsPerShard {
		fmt.Printf("shard:%d count:%d\n", shard, count)
	}
	// Output:
	// # before
	// ## slice contents
	// 0
	// 0
	// 0
	// 0
	// 0
	// 0
	// ## row count per shard
	// shard:0 count:3
	// shard:1 count:3
	// # after
	// ## slice contents
	// 0
	// 0
	// 0
	// 0
	// 0
	// 0
	// ## row count per shard
	// shard:0 count:6
	// shard:1 count:0
}
// Copyright 2018 GRAIL, Inc. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.

package bigslice_test

import (
	"reflect"
	"sort"
	"testing"

	"github.com/grailbio/bigslice"
	"github.com/grailbio/bigslice/slicetest"
	"github.com/grailbio/bigslice/slicetype"
)

// sortedCogroup returns a Cogroup slice that sorts resulting groups with
// ordered elements.
func sortedCogroup(slices ...bigslice.Slice) bigslice.Slice {
	slice := bigslice.Cogroup(slices...)
	return bigslice.Map(slice, makeSortSlices(slice))
}

// makeSortSlices returns a map function (to be used with bigslice.Map) that sorts
// any slices with ordered elements.
func makeSortSlices(typ slicetype.Type) interface{} {
	in := make([]reflect.Type, typ.NumOut())
	for i := 0; i < typ.NumOut(); i++ {
		in[i] = typ.Out(i)
	}
	fTyp := reflect.FuncOf(in, in, false)
	f := reflect.MakeFunc(fTyp, func(args []reflect.Value) []reflect.Value {
		for _, arg := range args {
			if arg.Kind() != reflect.Slice {
				// Ignore anything that isn't a slice.
				continue
			}
			switch arg.Type().Elem().Kind() {
			case reflect.String:
			case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
			case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
			case reflect.Float32, reflect.Float64:
			default:
				// Ignore anything that isn't ordered.
				continue
			}
			sort.Slice(arg.Interface(), func(i, j int) bool {
				ai := arg.Index(i)
				aj := arg.Index(j)
				switch arg.Type().Elem().Kind() {
				case reflect.String:
					return ai.String() < aj.String()
				case reflect.Int, reflect.Int8, r


ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),gr=_r("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;u


	fprintf(verbose_file, "\t$end  accept\n");

    p = parser[stateno];
    if (p)
    {
	print_shifts(p);
	print_reductions(p, defred[stateno]);
    }

    sp = shift_table[stateno];
    if (sp && sp->nshifts > 0)
    {
	as = accessing_symbol[sp->shift[sp->nshifts - 1]];
	if (ISVAR(as))
	    print_gotos(stateno);
    }
}

print_shifts(p)
register action *p;
{
    register int count;
    register action *q;

    count = 0;
    for (q = p; q; q = q->next)
    {
	if (q->suppressed < 2 && q->action_code == SHIFT)
	    ++count;
    }

    if (count > 0)
    {
	for (; p; p = p->next)
	{
	    if (p->action_code == SHIFT && p->suppressed == 0)
		fprintf(verbose_file, "\t%s  shift %d\n",
			    symbol_name[p->symbol], p->number);
	}
    }
}

print_reductions(p, defred)
register action *p;
register int defred;
{
    register int k, anyreds;
    register action *q;

    anyreds = 0;
    for (q = p; q ; q = q->next)
    {
	if (q->action_code == REDUCE && q->suppressed < 2)
	{
	    anyreds = 1;
	    break;
	}
    }

    if (anyreds == 0)
	fprintf(verbose_file, "\t.  error\n");
    else
    {
	for (; p; p = p->next)
	{
	    if (p->action_code == REDUCE && p->number != defred)
	    {
		k = p->number - 2;
		if (p->suppressed == 0)
		    fprintf(verbose_file, "\t%s  reduce %d\n",
			    symbol_name[p->symbol], k);
	    }
	}

        if (defred > 0)
	    fprintf(verbose_file, "\t.  reduce %d\n", defred - 2);
    }
}

print_gotos(stateno)
int stateno;
{
    register int i, k;
    register int as;
    register short *to_state;
    register shifts *sp;

    putc('\n', verbose_file);
    sp = shift_table[stateno];
    to_state = sp->shift;
    for (i = 0; i < sp->nshifts; ++i)
    {
	k = to_state[i];
	as = accessing_symbol[k];
	if (ISVAR(as))
	    fprintf(verbose_file, "\t%s  goto %d\n", symbol_name[as], k);
    }
}


ictor_decompress_fir_adapt(alac.predicterror_buffer_a, outputsamples, readsamplesize, predictor_coef_table, predictor_coef_num, prediction_quantitization);
				}
				else
				{
					System.err.println("FIXME: unhandled predicition type: " +prediction_type);

					/* i think the only other prediction type (or perhaps this is just a
					 * boolean?) runs adaptive fir twice.. like:
					 * predictor_decompress_fir_adapt(predictor_error, tempout, ...)
					 * predictor_decompress_fir_adapt(predictor_error, outputsamples ...)
					 * little strange..
					 */
				}

			}
			else
			{ // not compressed, easy case
				if (alac.setinfo_sample_size <= 16)
				{
					int bitsmove  = 0;
					for (int i = 0; i < outputsamples; i++)
					{
						int audiobits  = readbits(alac, alac.setinfo_sample_size);
						bitsmove = 32 - alac.setinfo_sample_size;

						audiobits = ((audiobits << bitsmove) >> bitsmove);

						alac.outputsamples_buffer_a[i] = audiobits;
					}
				}
				else
				{
					int x ;
					int m  = 1 << (24 -1);
					for (int i = 0; i < outputsamples; i++)
					{
						int audiobits ;

						audiobits = readbits(alac, 16);
						/* special case of sign extension..
						 * as we'll be ORing the low 16bits into this */
						audiobits = audiobits << (alac.setinfo_sample_size - 16);
						audiobits = audiobits | readbits(alac, alac.setinfo_sample_size - 16);
						x = audiobits & ((1 << 24) - 1);
						audiobits = (x ^ m) - m;	// sign extend 24 bits

						alac.outputsamples_buffer_a[i] = audiobits;
					}
				}
				uncompressed_bytes = 0; // always 0 for uncompressed
			}

			switch(alac.setinfo_sample_size)
			{
			case 16:
			{

				for (int i = 0; i < outputsamples; i++)
				{
					int sample  = alac.outputsamples_buffer_a[i];
					outbuffer[i * alac.numchannels] = sample;

					/*
					** We have to handle the case where the data is actually mono, but the stsd atom says it has 2 channels
					** in this case we create a stereo file where one of the channels is silent. If mono and 1 channel this value
					** will be overwritten in the next iteration
					*/

					outbuffer[(i * alac.numchannels) + 1] = 0;
				}
				break;
			}
			case 24:
			{
				for (int i = 0; i < outputsamples; i++)
				{
					int sample  = alac.outputsamples_buffer_a[i];

					if (uncompressed_bytes != 0)
					{
						int mask  = 0;
						sample = sample << (uncompressed_bytes * 8);
						mask = ~(0xFFFFFFFF << (uncompressed_bytes * 8));
						sample = sample | (alac.uncompressed_bytes_buffer_a[i] & mask);
					}

					outbuffer[i * alac.numchannels * 3] = ((sample) & 0xFF);
					outbuffer[i * alac.numchannels * 3 + 1] = ((sample >> 8) & 0xFF);
					outbuffer[i * alac.numchannels * 3 + 2] = ((sample >> 16) & 0xFF);

					/*
					** We have to handle the case where the data is actually mono, but the stsd atom says it has 2 channels
					** in this case we create a stereo file where one of the channels is silent. If mono and 1 channel this value


ation.Region = ""
		}
		outCluster.ClearClusterValue()
	}
}

// 检查某个level的实例数量是否满足要求，实例数量是否大于0
func (g *NearbyBasedInstancesFilter) checkLevelCount(allLevelsCount *[4]nearbyLevelInstanceCount,
	level int) (satisfied bool, notZero bool) {
	notZero = allLevelsCount[level].allCount > 0
	satisfied = notZero
	if *g.cfg.EnableDegradeByUnhealthyPercent {
		satisfied = notZero &&
			float64(allLevelsCount[level].unHealthCount)/float64(allLevelsCount[level].allCount) < g.unHealthyRatio
	}
	return satisfied, notZero
}

// 将allLevelsCount转化为字符串
func allLevelsCountToString(allLevelsCount *[4]nearbyLevelInstanceCount) string {
	return fmt.Sprintf("location matched status：[ all Level:{health: %d, unhealth: %d},"+
		" region Level:{health: %d, unhealth: %d}, zone Level:{health: %d, unhealth: %d},"+
		" campus Level:{health: %d, unhealth: %d} ]", allLevelsCount[0].healthCount, allLevelsCount[0].unHealthCount,
		allLevelsCount[1].healthCount, allLevelsCount[1].unHealthCount,
		allLevelsCount[2].healthCount, allLevelsCount[2].unHealthCount,
		allLevelsCount[3].healthCount, allLevelsCount[3].unHealthCount)
}

// 检查是否发生了地域降级
func checkNearbyStatus(matchLevel, finalLevel int) servicerouter.RouteStatus {
	if matchLevel == finalLevel {
		return servicerouter.Normal
	}
	switch finalLevel {
	case priorityLevelZone:
		return servicerouter.DegradeToCity
	case priorityLevelRegion:
		return servicerouter.DegradeToRegion
	case priorityLevelAll:
		return servicerouter.DegradeToAll
	}
	return servicerouter.Normal
}

func (g *NearbyBasedInstancesFilter) GetLevel(clusters model.ServiceClusters) (int, int) {
	matchLevel := g.matchLevel
	maxMatchLevel := g.maxMatchLevel

	namespace := clusters.GetServiceKey().Namespace
	service := clusters.GetServiceKey().Service

	if namespace == config.ServerNamespace && !strings.Contains(service, "polaris.metric") {
		matchLevel = priorityLevelRegion
		maxMatchLevel = priorityLevelAll
	} else {
		serviceSp := g.wholeCfg.GetConsumer().GetServiceSpecific(namespace, service)
		if serviceSp != nil {
			nearbySp := serviceSp.GetServiceRouter().GetNearbyConfig()
			if nearbySp.GetMatchLevel() != "" {
				matchLevel = nearbyLevels[nearbySp.GetMatchLevel()]
			}
			if nearbySp.GetMaxMatchLevel() != "" {
				maxMatchLevelTmp := nearbyLevels[nearbySp.GetMaxMatchLevel()]
				if maxMatchLevelTmp <= matchLevel {
					g.maxMatchLevel = maxMatchLevelTmp
				} else {
					log.GetBaseLogger().Warnf("%s %s nearbyConfig maxMatchLevel > matchLevel", namespace, service)
				}
			}
		}
	}
	return matchLevel, maxMatchLevel
}

// GetFilteredInstances 进行服务实例过滤，并返回过滤后的实例列表
func (g *NearbyBasedInstancesFilter) GetFilteredInstances(rInfo *servicerouter.RouteInfo,
	clusters model.ServiceClusters, withinCluster *model.Cluster) (*servicerouter.RouteResult, error) {
	// 记录各个匹配级别的实例数量
	var allLevelsCount [4]nearbyLevelInstanceCount
	var outCluster *model.Cluster
	// var enableNearby bool


4#3
# asm 2: shr  $21,<t=%rdx
shr  $21,%rdx

# qhasm: (uint32) t &= 0xFF
# asm 1: and  $0xFF,<t=int64#3d
# asm 2: and  $0xFF,<t=%edx
and  $0xFF,%edx

# qhasm: *(uint8 *) (input_0 + 9) = t
# asm 1: movb   <t=int64#3b,9(<input_0=int64#1)
# asm 2: movb   <t=%dl,9(<input_0=%rdi)
movb   %dl,9(%rdi)

# qhasm: t = r1
# asm 1: mov  <r1=int64#4,>t=int64#3
# asm 2: mov  <r1=%rcx,>t=%rdx
mov  %rcx,%rdx

# qhasm: (uint64) t >>= 29
# asm 1: shr  $29,<t=int64#3
# asm 2: shr  $29,<t=%rdx
shr  $29,%rdx

# qhasm: (uint32) t &= 0xFF
# asm 1: and  $0xFF,<t=int64#3d
# asm 2: and  $0xFF,<t=%edx
and  $0xFF,%edx

# qhasm: *(uint8 *) (input_0 + 10) = t
# asm 1: movb   <t=int64#3b,10(<input_0=int64#1)
# asm 2: movb   <t=%dl,10(<input_0=%rdi)
movb   %dl,10(%rdi)

# qhasm: t = r1
# asm 1: mov  <r1=int64#4,>t=int64#3
# asm 2: mov  <r1=%rcx,>t=%rdx
mov  %rcx,%rdx

# qhasm: (uint64) t >>= 37
# asm 1: shr  $37,<t=int64#3
# asm 2: shr  $37,<t=%rdx
shr  $37,%rdx

# qhasm: (uint32) t &= 0xFF
# asm 1: and  $0xFF,<t=int64#3d
# asm 2: and  $0xFF,<t=%edx
and  $0xFF,%edx

# qhasm: *(uint8 *) (input_0 + 11) = t
# asm 1: movb   <t=int64#3b,11(<input_0=int64#1)
# asm 2: movb   <t=%dl,11(<input_0=%rdi)
movb   %dl,11(%rdi)

# qhasm: s = r1
# asm 1: mov  <r1=int64#4,>s=int64#3
# asm 2: mov  <r1=%rcx,>s=%rdx
mov  %rcx,%rdx

# qhasm: (uint64) s >>= 45
# asm 1: shr  $45,<s=int64#3
# asm 2: shr  $45,<s=%rdx
shr  $45,%rdx

# qhasm: t = r2
# asm 1: mov  <r2=int64#5,>t=int64#4
# asm 2: mov  <r2=%r8,>t=%rcx
mov  %r8,%rcx

# qhasm: t <<= 6
# asm 1: shl  $6,<t=int64#4
# asm 2: shl  $6,<t=%rcx
shl  $6,%rcx

# qhasm: (uint32) t &= 0xC0
# asm 1: and  $0xC0,<t=int64#4d
# asm 2: and  $0xC0,<t=%ec


 + 1; // fixed

    private static final int CONTEXTUAL_MASK = 1<<31;

    private static final char[] bases = {
        '\u0030' - '\u0030', // EUROPEAN
        '\u0660' - '\u0030', // ARABIC-INDIC
        '\u06f0' - '\u0030', // EXTENDED ARABIC-INDIC (EASTERN_ARABIC)
        '\u0966' - '\u0030', // DEVANAGARI
        '\u09e6' - '\u0030', // BENGALI
        '\u0a66' - '\u0030', // GURMUKHI
        '\u0ae6' - '\u0030', // GUJARATI
        '\u0b66' - '\u0030', // ORIYA
        '\u0be6' - '\u0030', // TAMIL - zero was added in Unicode 4.1
        '\u0c66' - '\u0030', // TELUGU
        '\u0ce6' - '\u0030', // KANNADA
        '\u0d66' - '\u0030', // MALAYALAM
        '\u0e50' - '\u0030', // THAI
        '\u0ed0' - '\u0030', // LAO
        '\u0f20' - '\u0030', // TIBETAN
        '\u1040' - '\u0030', // MYANMAR
        '\u1369' - '\u0031', // ETHIOPIC - no zero
        '\u17e0' - '\u0030', // KHMER
        '\u1810' - '\u0030', // MONGOLIAN
    };

    // some ranges adjoin or overlap, rethink if we want to do a binary search on this

    private static final char[] contexts = {
        '\u0000', '\u0300', // 'EUROPEAN' (really latin-1 and extended)
        '\u0600', '\u0780', // ARABIC
        '\u0600', '\u0780', // EASTERN_ARABIC -- note overlap with arabic
        '\u0900', '\u0980', // DEVANAGARI
        '\u0980', '\u0a00', // BENGALI
        '\u0a00', '\u0a80', // GURMUKHI
        '\u0a80', '\u0b00', // GUJARATI
        '\u0b00', '\u0b80', // ORIYA
        '\u0b80', '\u0c00', // TAMIL
        '\u0c00', '\u0c80', // TELUGU
        '\u0c80', '\u0d00', // KANNADA
        '\u0d00', '\u0d80', // MALAYALAM
        '\u0e00', '\u0e80', // THAI
        '\u0e80', '\u0f00', // LAO
        '\u0f00', '\u1000', // TIBETAN
        '\u1000', '\u1080', // MYANMAR
        '\u1200', '\u1380', // ETHIOPIC - note missing zero
        '\u1780', '\u1800', // KHMER
        '\u1800', '\u1900', // MONGOLIAN
        '\uffff',
    };

    // assume most characters are near each other so probing the cache is infrequent,
    // and a linear probe is ok.

    private static int ctCache = 0;
    private static int ctCacheLimit = contexts.length - 2;

    // warning, synchronize access to this as it modifies state
    private static int getContextKey(char c) {
        if (c < contexts[ctCache]) {
            while (ctCache > 0 && c < contexts[ctCache]) --ctCache;
        } else if (c >= contexts[ctCache + 1]) {
            while (ctCache < ctCacheLimit && c >= contexts[ctCache + 1]) ++ctCache;
        }

        // if we're not in a known range, then return EUROPEAN as the range key
        return (ctCache & 0x1) == 0 ? (ctCache / 2)


ters of length limit codepoints.
fn find_specials(cluster: &str, limit: u32) -> Option<(usize, usize)> {
    let (key, bytes_hashed) = super::murmur3(cluster, M3_SEED, limit);
    match HASH_SPECIALS.binary_search(&key) {
        Ok(index) => return Some((OFFSET_SPECIALS[index], bytes_hashed)),
        _ => None,
    }
}

/// Index of murmur3(grapheme cluster); sort matches OFFSET_SPECIALS
const HASH_SPECIALS: [u32; 1] = [
    0x58A5DA35,  // "�"
];

/// Lookup table of blit pattern offsets; sort matches HASH_SPECIALS
const OFFSET_SPECIALS: [usize; 1] = [
    1399, // "�"
];

/// Packed glyph pattern data.
/// Record format:
///  [offset+0]: ((w as u8) << 16) | ((h as u8) << 8) | (yOffset as u8)
///  [offset+1..=ceil(w*h/32)]: packed 1-bit pixels; 0=clear, 1=set
/// Pixels are packed in top to bottom, left to right order with MSB of first
/// pixel word containing the top left pixel.
///  w: Width of pattern in pixels
///  h: Height of pattern in pixels
///  yOffset: Vertical offset (pixels downward from top of line) to position
///     glyph pattern properly relative to text baseline
pub const DATA: [u32; 1412] = [
    // [0]: 20 " "
    0x0004020e, 0x00000000,
    // [2]: 21 "!"
    0x00021206, 0xfffffff0, 0xf0000000,
    // [5]: 22 "\""
    0x00060406, 0xcf3cf300,
    // [7]: 23 "#"
    0x000e0a06, 0x3300cc0f, 0xff3ffc0c, 0xc03303ff, 0xcfff0330, 0x0cc00000,
    // [13]: 24 "$"
    0x000a1604, 0x0c0303f0, 0xfcccf330, 0xcc330f03, 0xc3c0f0cc, 0x330cc330, 0xccf333f0, 0xfc0c0300,
    // [21]: 25 "%"
    0x000e1206, 0xfff3ffcc, 0x30f0c333, 0x0ccc30cf, 0x033c0300, 0x0c03cc0f, 0x30c3330c, 0xcc30f0c3,
    0x3c0cf030,
    // [30]: 26 "&"
    0x00101206, 0x00f000f0, 0x030c030c, 0x00cc00cc, 0x00300030, 0x00cc00cc, 0x33033303, 0x0c030c03,
    0x33033303, 0xc0fcc0fc,
    // [40]: 27 "'"
    0x00020406, 0xff000000,
    // [42]: 28 "("
    0x00061604, 0xc3030c30, 0xc0c30c30, 0xc30c30c3, 0x30c30cc3, 0x00000000,
    // [48]: 29 ")"
    0x00061604, 0x0c330c30, 0xcc30c30c, 0x30c30c30, 0x30c30c0c, 0x30000000,
    // [54]: 2A "*"
    0x000a0a08, 0x0c030ccf, 0x333f0fc3, 0x30ccc0f0, 0x30000000,
    // [59]: 2B "+"
    0x000a0a0a, 0x0c0300c0, 0x30fffff0, 0xc0300c03, 0x00000000,
    // [64]: 2C ","
    0x00040616, 0xcccc3300,
    // [66]: 2D "-"
    0x000a020e, 0xfffff000,
    // [68]: 2E "."
    0x00020216, 0xf0000000,


$t4)
/* 084580 800FBB10 AD2AFFF8 */  sw    $t2, -8($t1)
/* 084584 800FBB14 8D8BFFFC */  lw    $t3, -4($t4)
/* 084588 800FBB18 158DFFF8 */  bne   $t4, $t5, .L800FBAFC_ovl2
/* 08458C 800FBB1C AD2BFFFC */   sw    $t3, -4($t1)
/* 084590 800FBB20 3C048013 */  lui   $a0, %hi(D_80129138) # $a0, 0x8013
/* 084594 800FBB24 8C849138 */  lw    $a0, %lo(D_80129138)($a0)
/* 084598 800FBB28 0C03E90E */  jal   func_800FA438
/* 08459C 800FBB2C 02002825 */   move  $a1, $s0
/* 0845A0 800FBB30 3C048013 */  lui   $a0, %hi(D_80129138) # $a0, 0x8013
/* 0845A4 800FBB34 8C849138 */  lw    $a0, %lo(D_80129138)($a0)
/* 0845A8 800FBB38 02002825 */  move  $a1, $s0
/* 0845AC 800FBB3C 0C03E970 */  jal   func_800FA5C0
/* 0845B0 800FBB40 02203025 */   move  $a2, $s1
/* 0845B4 800FBB44 3C048013 */  lui   $a0, %hi(D_80129138) # $a0, 0x8013
/* 0845B8 800FBB48 8C849138 */  lw    $a0, %lo(D_80129138)($a0)
/* 0845BC 800FBB4C 02002825 */  move  $a1, $s0
/* 0845C0 800FBB50 0C03E982 */  jal   func_800FA608
/* 0845C4 800FBB54 02203025 */   move  $a2, $s1
/* 0845C8 800FBB58 3C048013 */  lui   $a0, %hi(D_80129138) # $a0, 0x8013
/* 0845CC 800FBB5C 8C849138 */  lw    $a0, %lo(D_80129138)($a0)
/* 0845D0 800FBB60 02002825 */  move  $a1, $s0
/* 0845D4 800FBB64 0C03E9FB */  jal   func_800FA7EC
/* 0845D8 800FBB68 02203025 */   move  $a2, $s1
/* 0845DC 800FBB6C 3C048013 */  lui   $a0, %hi(D_80129138) # $a0, 0x8013
/* 0845E0 800FBB70 8C849138 */  lw    $a0, %lo(D_80129138)($a0)
/* 0845E4 800FBB74 02002825 */  move  $a1, $s0
/* 0845E8 800FBB78 0C03EA4B */  jal   func_800FA92C
/* 0845EC 800FBB7C 02203025 */   move  $a2, $s1
/* 0845F0 800FBB80 3C048013 */  lui   $a0, %hi(D_801292B0) # $a0, 0x8013
/* 0845F4 800FBB84 248492B0 */  addiu $a0, %lo(D_801292B0) # addiu $a0, $a0, -0x6d50
/* 0845F8 800FBB88 02002825 */  move  $a1, $s0
/* 0845FC 800FBB8C 0C03EB1D


al44 = *edge->m_pointB;
		local44 -= m_centerPoint;
		length = local44.LenSquared();

		if (m_boundingRadius < length) {
			m_boundingRadius = length;
		}
	}

	m_boundingRadius = sqrt((double) m_boundingRadius);

	for (i = 0; i < m_numEdges; i++) {
		edge = m_edges[i];
		Vector3& local5c = edge->m_dir;

		if (edge->m_length == 0) {
			local5c = *m_edges[i]->m_pointB;
			local5c -= *m_edges[i]->m_pointA;
			edge->m_length = local5c.LenSquared();

			if (edge->m_length <= 0.0f) {
				assert(0);
				if (result == 0) {
					result = -1;
				}
			}

			edge->m_length = sqrt((double) edge->m_length);
			local5c /= edge->m_length;
		}

		Mx3DPointFloat local58;
		Vector3 local64(&m_edgeNormals[i][0]);
		edge->GetFaceNormal(*this, local58);
		local64.EqualsCross(local58, m_up);

		m_edgeNormals[i][3] = -local64.Dot(*m_edges[i]->m_pointA, local64);
		if (m_edgeNormals[i][3] + m_centerPoint.Dot(m_centerPoint, local64) < 0.0f) {
			m_edgeNormals[i] *= -1.0f;
		}

		if (edge->GetFaceA() != NULL && edge->GetFaceB() != NULL) {
			edge->SetFlags(LegoOrientedEdge::c_bit1 | LegoOrientedEdge::c_bit2);
		}
	}

	if (m_numTriggers > 0) {
		Vector3* vTrig1 = m_edges[0]->CCWVertex(*this);
		Vector3* vTrig2 = m_edges[1]->CCWVertex(*this);
		assert(vTrig1 && vTrig2);

		m_direction = new Mx3DPointFloat();
		*m_direction = *vTrig2;
		*m_direction -= *vTrig1;

		if (m_direction->Unitize() < 0) {
			assert(0);
			delete m_direction;
			m_direction = NULL;
		}

		if (GetNumEdges() == 4) {
			float local98 = 0.0f;
			Mx3DPointFloat localb8(*m_edges[0]->CWVertex(*this));
			Mx3DPointFloat local80(*m_edges[2]->CCWVertex(*this));
			Mx3DPointFloat local94(*vTrig2);

			local94 -= *vTrig1;
			float local9c = sqrt(local94.LenSquared());

			localb8 -= *vTrig1;
			local80 -= *vTrig1;

			float locala4 = localb8.Dot(*m_direction, localb8);
			if (local98 < locala4) {
				local98 = locala4;
			}

			locala4 = local80.Dot(*m_direction, local80);
			if (locala4 < local9c) {
				local9c = locala4;
			}

			if (local9c < local98) {
				result = -3;
			}
			if (local9c - local98 < 0.0025) {
				result = -4;
			}

			local98 += 0.001;
			local9c -= 0.001;

			for (LegoS32 j = 0; j < m_numTriggers; j++) {
				if (m_pathTrigger[j].m_triggerLength < local98) {
					m_pathTrigger[j].m_triggerLength


 = state;
}

}  // namespace finalcut

//----------------------------------------------------------------------
// class FEventTest
//----------------------------------------------------------------------

class FEventTest : public CPPUNIT_NS::TestFixture
{
  public:
    FEventTest() = default;

  protected:
    void feventTest();
    void fkeyeventTest();
    void fmouseeventTest();
    void fwheeleventTest();
    void ffocuseventTest();
    void facceleventTest();
    void fresizeeventTest();
    void fshoweventTest();
    void fhideeventTest();
    void fcloseeventTest();
    void ftimereventTest();
    void fusereventTest();

  private:
    // Adds code needed to register the test suite
    CPPUNIT_TEST_SUITE (FEventTest);

    // Add a methods to the test suite
    CPPUNIT_TEST (feventTest);
    CPPUNIT_TEST (fkeyeventTest);
    CPPUNIT_TEST (fmouseeventTest);
    CPPUNIT_TEST (fwheeleventTest);
    CPPUNIT_TEST (ffocuseventTest);
    CPPUNIT_TEST (facceleventTest);
    CPPUNIT_TEST (fresizeeventTest);
    CPPUNIT_TEST (fshoweventTest);
    CPPUNIT_TEST (fhideeventTest);
    CPPUNIT_TEST (fcloseeventTest);
    CPPUNIT_TEST (ftimereventTest);
    CPPUNIT_TEST (fusereventTest);

    // End of test suite definition
    CPPUNIT_TEST_SUITE_END();
};

//----------------------------------------------------------------------
void FEventTest::feventTest()
{
  finalcut::FEvent event (finalcut::Event::None);
  CPPUNIT_ASSERT ( event.getType() == finalcut::Event::None );
  CPPUNIT_ASSERT ( ! event.wasSent() );
  finalcut::setSend(event, true);
  CPPUNIT_ASSERT ( event.wasSent() );
  finalcut::setSend(event, false);
  CPPUNIT_ASSERT ( ! event.wasSent() );
  CPPUNIT_ASSERT ( ! event.isQueued() );
  finalcut::setQueued(event, true);
  CPPUNIT_ASSERT ( event.isQueued() );
  finalcut::setQueued(event, false);
  CPPUNIT_ASSERT ( ! event.isQueued() );

  finalcut::FEvent event1 (finalcut::Event::KeyPress);
  CPPUNIT_ASSERT ( event1.getType() == finalcut::Event::KeyPress );

  finalcut::FEvent event2 (finalcut::Event::KeyUp);
  CPPUNIT_ASSERT ( event2.getType() == finalcut::Event::KeyUp );

  finalcut::FEvent event3 (finalcut::Event::KeyDown);
  CPPUNIT_ASSERT ( event3.getType() == finalcut::Event::KeyDown );

  finalcut::FEvent event4 (finalcut::Event::MouseDown);
  CPPUNIT_ASSERT ( event4.getType() == finalcut::Event::MouseDown );

  finalcut::FEvent event5 (finalcut::Event::MouseUp);
  CPPUNIT_ASSERT ( event5.getType() == finalcut::Event::MouseUp );

  finalcut::FEvent event6 (finalcut::Event::MouseDoubleClick);
  CPPUNIT_ASSERT ( event6.getType() == finalcut::Event::MouseDoubleClick );

  finalcut::FEvent event7 (finalcut::Event::MouseWheel);
  CPPUNIT_ASSERT ( event7.getType() == finalcut::Event::MouseWheel );

  finalcut::FEvent event8 (finalcut::Event::MouseMove);
  CPPUNIT_ASSERT ( event8.getType() == finalcut::Event::MouseMove );

  finalcut::FEvent event9 (finalcut::Event::FocusIn);
  CPPUNIT_ASSERT ( event9 .getType() == finalcut::Event::FocusIn );

  finalcut::FEvent event10 (finalcut::Event::FocusOut);
  CPPUNIT_ASSERT ( event10.getType() == finalcut::Event::FocusOut );

  finalcut::FEvent event11 (finalcut::Event::ChildFocusIn);
  CPPUNIT_ASSERT ( event11.get


== Approx(0.0) );

  REQUIRE( accu(abs(cx_mat(cx_double(2,3)*C.t())    - cx_double(2,3)*Ct)) == Approx(0.0) );
  REQUIRE( accu(abs(cx_mat(cx_double(2,3)*trans(C)) - cx_double(2,3)*Ct)) == Approx(0.0) );

  REQUIRE( accu(abs((C.t()    + Ct) - 2*Ct)) == Approx(0.0) );
  REQUIRE( accu(abs((trans(C) + Ct) - 2*Ct)) == Approx(0.0) );

  REQUIRE( accu(abs(cx_rowvec(C.col(1).t()) - C_col1_t)) == Approx(0.0) );
  REQUIRE( accu(abs(cx_colvec(C.row(1).t()) - C_row1_t)) == Approx(0.0) );

  REQUIRE( accu(abs(C.col(1).t() - C_col1_t)) == Approx(0.0) );
  REQUIRE( accu(abs(C.row(1).t() - C_row1_t)) == Approx(0.0) );

  REQUIRE( accu(abs(2*C.col(1).t() - 2*C_col1_t)) == Approx(0.0) );
  REQUIRE( accu(abs(2*C.row(1).t() - 2*C_row1_t)) == Approx(0.0) );

  REQUIRE( accu(abs( (C.col(1).t() + C_col1_t) - 2*C_col1_t)) == Approx(0.0) );
  REQUIRE( accu(abs( (C.row(1).t() + C_row1_t) - 2*C_row1_t)) == Approx(0.0) );

  //

  REQUIRE( accu(abs(cx_mat(C.st())    - conj(Ct))) == Approx(0.0) );
  REQUIRE( accu(abs(cx_mat(strans(C)) - conj(Ct))) == Approx(0.0) );

  REQUIRE( accu(abs(C.st()    - conj(Ct))) == Approx(0.0) );
  REQUIRE( accu(abs(strans(C) - conj(Ct))) == Approx(0.0) );

  REQUIRE( accu(abs(2*C.st()    - conj(2*Ct))) == Approx(0.0) );
  REQUIRE( accu(abs(2*strans(C) - conj(2*Ct))) == Approx(0.0) );

  REQUIRE( accu(abs(cx_double(2,3)*C.st()    - cx_double(2,3)*conj(Ct))) == Approx(0.0) );
  REQUIRE( accu(abs(cx_double(2,3)*strans(C) - cx_double(2,3)*conj(Ct))) == Approx(0.0) );

  REQUIRE( accu(abs((C.st()    + C.st()) - conj(2*Ct))) == Approx(0.0) );
  REQUIRE( accu(abs((strans(C) + C.st()) - conj(2*Ct))) == Approx(0.0) );

  REQUIRE( accu(abs(cx_rowvec(C.col(1).st()) - conj(C_col1_t))) == Approx(0.0) );
  REQUIRE( accu(abs(cx_colvec(C.row(1).st()) - conj(C_row1_t))) == Approx(0.0) );

  REQUIRE( accu(abs(C.col(1).st() - conj(C_col1_t))) == Approx(0.0) );
  REQUIRE( accu(abs(C.row(1).st() - conj(


ur Velocity
  - +13.2% Aim Glide/Wall Latch Duration
  - +150% <DT_FREEZE_COLOR>Cold on Bullet Jump
- stats:
  - +15.4% to Parkour Velocity
  - +15.4% Aim Glide/Wall Latch Duration
  - +175% <DT_FREEZE_COLOR>Cold on Bullet Jump
- stats:
  - +17.6% to Parkour Velocity
  - +17.6% Aim Glide/Wall Latch Duration
  - +200% <DT_FREEZE_COLOR>Cold on Bullet Jump
- stats:
  - +19.8% to Parkour Velocity
  - +19.8% Aim Glide/Wall Latch Duration
  - +225% <DT_FREEZE_COLOR>Cold on Bullet Jump
- stats:
  - +22% to Parkour Velocity
  - +22% Aim Glide/Wall Latch Duration
  - +250% <DT_FREEZE_COLOR>Cold on Bullet Jump
- stats:
  - +24.2% to Parkour Velocity
  - +24.2% Aim Glide/Wall Latch Duration
  - +275% <DT_FREEZE_COLOR>Cold on Bullet Jump
image: ../images/ice-spring-19ef156872.jpg
last_updated: '2025-09-17'
name: Ice Spring
polarity: vazarin
rarity: Rare
release_date: '2015-07-31'
source: WFCD
tags:
- Mods
tradable: true
type: Warframe Mod
---

# Ice Spring

## Overview

**Ice Spring** is a warframe mod with vazarin polarity.

## Effects

| Rank | Effects |
|------|----------|
| 0 | stats: ['+2.2% to Parkour Velocity', '+2.2% Aim Glide/Wall Latch Duration', '+25% <DT_FREEZE_COLOR>Cold on Bullet Jump'] |
| 1 | stats: ['+4.4% to Parkour Velocity', '+4.4% Aim Glide/Wall Latch Duration', '+50% <DT_FREEZE_COLOR>Cold on Bullet Jump'] |
| 2 | stats: ['+6.6% to Parkour Velocity', '+6.6% Aim Glide/Wall Latch Duration', '+75% <DT_FREEZE_COLOR>Cold on Bullet Jump'] |
| 3 | stats: ['+8.8% to Parkour Velocity', '+8.8% Aim Glide/Wall Latch Duration', '+100% <DT_FREEZE_COLOR>Cold on Bullet Jump'] |
| 4 | stats: ['+11% to Parkour Velocity', '+11% Aim Glide/Wall Latch Duration', '+125% <DT_FREEZE_COLOR>Cold on Bullet Jump'] |
| 5 | stats: ['+13.2% to Parkour Velocity', '+13.2% Aim Glide/Wall Latch Duration', '+150% <DT_FREEZE_COLOR>Cold on Bullet Jump'] |
| 6 | stats: ['+15.4% to Parkour Velocity', '+15.4% Aim Glide/Wall Latch Duration', '+175% <DT_FREEZE_COLOR>Cold on Bullet Jump'] |
| 7 | stats: ['+17.6% to Parkour Velocity', '+17.6% Aim Glide/Wall Latch Duration', '+200% <DT_FREEZE_COLOR>Cold on Bullet Jump'] |
| 8 | stats: ['+19.8% to Parkour Velocity', '+19.8% Aim Glide/Wall Latch Duration', '+225% <DT_FREEZE_COLOR>Cold on Bullet Jump'] |
| 9 | stats: ['+22% to Parkour Velocity', '+22% Aim Glide/Wall Latch Duration', '+250% <DT_FREEZE_COLOR>Cold on Bullet Jump'] |
| 10 | stats: ['+24.2% to Parkour Velocity', '+24.2% Aim Glide/Wall Latch Duration', '+275% <DT_FREEZE_COLOR>Cold on Bullet Jump'] |

## Acquisition

Available from:
- Drekar Butcher (0.0002% chance)
- Ku


          title: 'Skattur',
          calculation: `- 78.625 kr.`,
        },
        {
          title: 'Persónuafsláttur',
          calculation: `0 kr. `,
        },
        {
          title: 'Áætluð aðstoð (hámark)',
          calculation: `171.375 kr.`,
        },
      ])
    })

    test('should return estimated breakdown from 250000 with personal tax credit', () => {
      const breakdown = estimatedBreakDown(250000, true)
      expect(breakdown).toEqual([
        {
          title: 'Grunnupphæð',
          calculation: `+ 250.000 kr.`,
        },
        {
          title: 'Skattur',
          calculation: `- 78.625 kr.`,
        },
        {
          title: 'Persónuafsláttur',
          calculation: `+ 59.665 kr. `,
        },
        {
          title: 'Áætluð aðstoð (hámark)',
          calculation: `231.040 kr.`,
        },
      ])
    })
  })

  describe('acceptedAmountBreakDown', () => {
    test('should return empty array', () => {
      const amountBreakdown = acceptedAmountBreakDown()
      expect(amountBreakdown).toEqual([])
    })

    test('should return empty array', () => {
      const amountBreakdown = acceptedAmountBreakDown(undefined)
      expect(amountBreakdown).toEqual([])
    })

    test('should return amount from 100.000', () => {
      const amountBreakdown = acceptedAmountBreakDown({
        aidAmount: 100000,
        personalTaxCredit: 0,
        tax: 31450,
        finalAmount: 68550,
      })
      expect(amountBreakdown).toEqual([
        {
          title: 'Grunnupphæð',
          calculation: `+ 100.000 kr.`,
        },
        {
          title: 'Tekjur',
          calculation: `0 kr.`,
        },
        {
          title: 'Skattur',
          calculation: `- 31.450 kr.`,
        },
        {
          title: 'Persónuafsláttur',
          calculation: ` 0 kr.`,
        },
        {
          title: 'Aðstoð',
          calculation: `68.550 kr.`,
        },
      ])
    })

    test('should return amount from 100.000 with income and deductionFactors', () => {
      const amountBreakdown = acceptedAmountBreakDown({
        aidAmount: 100000,
        income: 20000,
        personalTaxCredit: 80,
        tax: 51450,
        finalAmount: 68550,
        deductionFactors: [
          {
            amount: 7000,
            description: 'Tekjur maka',
          },
          {
            amount: 10000,
            description: 'Bíll',
          },
        ],
      })
      expect(amountBreakdown).toEqual([
        {
          title: 'Grunnupphæð',
          calculation: `+ 100.000 kr.`,
        },
        {
          title: 'Tekjur',
          calculation: `- 20.000 kr.`,
        },
        {
          title: 'Tekjur maka',
          calculation: `- 7.000 kr.`,
        },
        {
          title: 'Bíll',
          calculation: `- 10.000 kr.`,
        },
        {
          title: 'Skattur',
          calculation: `- 51.450 kr.`,
        },
        {
          title: 'Persónuafsláttur',
          calculation: `+ 47.732 kr.`,
        },
        {
          title: 'Aðstoð',
          calculation: `68.550 kr.`,
        },
      ])
    })

    test('should return amount from 250.000', () => {
      const amountBreakdown = acceptedAmountBreakDown({
        aidAmount: 250000,
        personalTaxCredit: 0,
        t


>(), Context);

        var req = TestHttpRequestData.Empty("POST");
        if (parameterToSkip != "machine_id") {
            req.SetUrlParameter("machine_id", _machineId);
        }

        if (parameterToSkip != "pool_name") {
            req.SetUrlParameter("pool_name", _poolName);
        }

        var res